Mutable version of EasySavePaths allowing to change the base directory at runtime. When changing the path, existing configuration, state and log files are copied to the new location so that no data is lost.
More...
|
|
| MutableEasySavePaths (string baseDirectory) |
| | Initializes a new instance with the given base directory.
|
| async Task< bool > | SetBaseDirectoryAsync (string newBaseDirectory, CancellationToken cancellationToken=default) |
| | Changes the base directory to the new path. Copies existing backup-config.json, state.json and all daily log files (*.json, *.xml) from the current location to the new one so that no data is lost, then switches to the new path.
|
|
EasySavePaths | Snapshot () |
| | Returns a snapshot with the same shape as EasySavePaths for backward compatibility.
|
|
|
string | BaseDirectory [get] |
| | Directory containing configuration, state and log files.
|
|
string | ConfigFilePath [get] |
| | Full path to backup-config.json.
|
|
string | StateFilePath [get] |
| | Full path to state.json.
|
|
string | LogDirectory [get] |
| | Directory where daily log files are stored.
|
|
|
EventHandler? | PathsChanged |
| | Raised when the base directory has been changed (after files have been copied).
|
Mutable version of EasySavePaths allowing to change the base directory at runtime. When changing the path, existing configuration, state and log files are copied to the new location so that no data is lost.
◆ SetBaseDirectoryAsync()
| async Task< bool > EasySave.Gui.MutableEasySavePaths.SetBaseDirectoryAsync |
( |
string | newBaseDirectory, |
|
|
CancellationToken | cancellationToken = default ) |
Changes the base directory to the new path. Copies existing backup-config.json, state.json and all daily log files (*.json, *.xml) from the current location to the new one so that no data is lost, then switches to the new path.
- Parameters
-
| newBaseDirectory | The new base directory (will be created if needed). |
| cancellationToken | Optional cancellation token. |
- Returns
- True if the path was changed, false if the new path is the same as the current one.
The documentation for this class was generated from the following file:
- EasySave.Gui/MutableEasySavePaths.cs