Ejemplo n.º 1
0
 public void renamed(object sender, RenamedEventArgs e)
 {
     if (!_fileSystemHelper.isDirectory(e.FullPath))
     {
         renameFile(e);
         Console.WriteLine("File renamed!");
     }
     else
     {
         var files = _fileSystemHelper.getAllNestedLocalFiles(e.FullPath);
         if (files.Count > 0)
         {
             files.ForEach(fileName => renameFile(fileName, e.OldFullPath, e.FullPath));
             Console.WriteLine("Directory renamed!");
         }
         else
         {
             Console.WriteLine("Empty Directory, no action");
         }
     }
 }