/// <summary> /// Initializes the file system-based saga snapshot storage by ensuring that the snapshot directory exists and /// making sure that it's writable /// </summary> public void Initialize() { if (!Directory.Exists(_snapshotDirectory)) { _log.Info("Saga snapshot directory {directoryPath} does not exist - creating it!", _snapshotDirectory); Directory.CreateDirectory(_snapshotDirectory); } _log.Info("Checking that the current process has read/write access to directory {directoryPath}", _snapshotDirectory); FileSystemHelpers.EnsureDirectoryIsWritable(_snapshotDirectory); }
/// <summary> /// Initializes the file system data storage by ensuring that the configured data directory path exists and that it is writable /// </summary> public void Initialize() { if (!Directory.Exists(_directoryPath)) { _log.Info("Creating directory {directoryPath}", _directoryPath); Directory.CreateDirectory(_directoryPath); } _log.Info("Checking that the current process has read/write access to directory {directoryPath}", _directoryPath); FileSystemHelpers.EnsureDirectoryIsWritable(_directoryPath); }