private static void OnDeleted(object source, FileSystemEventArgs e) { string NowTime = DateTime.Now.ToString(); WriteLog(NowTime, false, $"File: {e.FullPath} deleted"); Monitoring.CreateSnapShot(NowTime, false); }
static void Main() { string Path = EnterAndCheckPath(); while (true) { PrintMenu(); switch (SelectMode()) { case 1: { Monitoring.MonitoringOn(Path); break; }; case 2: { Backup.GetPointBackup(Path); break; } case 3: { return; } } } }
private static void OnRenamed(object source, RenamedEventArgs e) { string NowTime = DateTime.Now.ToString(); WriteLog(NowTime, false, $"File: {e.OldFullPath} renamed to {e.FullPath}"); Monitoring.CreateSnapShot(NowTime, false); }