private void WatcherCreated(object sender, FileSystemEventArgs e) { if (Directory.Exists(options.TargetPath)) { targetDirPath = options.TargetPath; } if (options.Archive == true) { Archivator.Archive(e.FullPath, targetDirPath, options.Encrypt); } }
private void WatcherRenamed(object sender, RenamedEventArgs e) { if (Path.GetFileNameWithoutExtension(e.FullPath).Contains("DEARCHIVE")) { string fileEvent = "переименован в " + e.FullPath; string filePath = e.OldFullPath; RecordEntry(fileEvent, filePath); Archivator.Dearchive(e.FullPath, extractDirPath); File.Delete(e.FullPath); } }
private void WatcherCreated(object sender, FileSystemEventArgs e) { Archivator.Archive(e.FullPath, targetDirPath); }