public BackupSettings( PathAndSpecialFolder directory, bool isCreatingBackups, string extension, string timeStampFormat, bool hidden, int numberOfBackups, int maxAgeInDays) : base(directory, extension) { if (isCreatingBackups) { Ensure.NotNull(directory, nameof(directory)); Ensure.NotNullOrEmpty(extension, nameof(extension)); ValidateTimestampFormat(timeStampFormat); } _isCreatingBackups = isCreatingBackups; if (!string.IsNullOrWhiteSpace(timeStampFormat)) { _timeStampFormat = timeStampFormat; } if (numberOfBackups > 1) { _timeStampFormat = DefaultTimeStampFormat; } _hidden = hidden; _numberOfBackups = numberOfBackups; _maxAgeInDays = maxAgeInDays; }
public RepositorySettings( DirectoryInfo directory, bool isTrackingDirty, bool isCaching, BackupSettings backupSettings, string extension = ".cfg", string tempExtension = ".tmp") : this( PathAndSpecialFolder.Create(directory), isTrackingDirty, isCaching, backupSettings, extension, tempExtension) { }
public BackupSettings( DirectoryInfo directory, bool isCreatingBackups, string extension, string timeStampFormat, bool hidden, int numberOfBackups, int maxAgeInDays) : this( directory != null ? PathAndSpecialFolder.Create(directory) : null, isCreatingBackups, extension, timeStampFormat, hidden, numberOfBackups, maxAgeInDays) { }
public RepositorySettings( PathAndSpecialFolder directory, bool isTrackingDirty, bool isCaching, BackupSettings backupSettings, string extension = ".cfg", string tempExtension = ".tmp") : base(directory, extension) { Ensure.NotNullOrEmpty(extension, nameof(extension)); Ensure.NotNullOrEmpty(tempExtension, nameof(tempExtension)); Ensure.NotNull(directory, nameof(directory)); _isTrackingDirty = isTrackingDirty; _isCaching = isCaching; _backupSettings = backupSettings; _tempExtension = FileHelper.PrependDotIfMissing(tempExtension); }
public FileSettings(DirectoryInfo directory, string extension) { _directoryPath = PathAndSpecialFolder.Create(directory); _extension = FileHelper.PrependDotIfMissing(extension); }
public FileSettings(PathAndSpecialFolder directoryPath, string extension) { _directoryPath = directoryPath; _extension = FileHelper.PrependDotIfMissing(extension); }