public static void MirrorFolder(string from, string to, Func<string, string, bool> comparer)
 {
   // ISSUE: object of a compiler-generated type is created
   // ISSUE: variable of a compiler-generated type
   FileMirroring.\u003CMirrorFolder\u003Ec__AnonStorey72 folderCAnonStorey72 = new FileMirroring.\u003CMirrorFolder\u003Ec__AnonStorey72();
   // ISSUE: reference to a compiler-generated field
   folderCAnonStorey72.to = to;
   // ISSUE: reference to a compiler-generated field
   folderCAnonStorey72.from = from;
   // ISSUE: reference to a compiler-generated field
   // ISSUE: reference to a compiler-generated field
   folderCAnonStorey72.from = Path.GetFullPath(folderCAnonStorey72.from);
   // ISSUE: reference to a compiler-generated field
   // ISSUE: reference to a compiler-generated field
   folderCAnonStorey72.to = Path.GetFullPath(folderCAnonStorey72.to);
   // ISSUE: reference to a compiler-generated field
   if (!Directory.Exists(folderCAnonStorey72.from))
   {
     // ISSUE: reference to a compiler-generated field
     if (!Directory.Exists(folderCAnonStorey72.to))
       return;
     // ISSUE: reference to a compiler-generated field
     Directory.Delete(folderCAnonStorey72.to, true);
   }
   else
   {
     // ISSUE: reference to a compiler-generated field
     if (!Directory.Exists(folderCAnonStorey72.to))
     {
       // ISSUE: reference to a compiler-generated field
       Directory.CreateDirectory(folderCAnonStorey72.to);
     }
     // ISSUE: reference to a compiler-generated field
     // ISSUE: reference to a compiler-generated method
     IEnumerable<string> first = ((IEnumerable<string>) Directory.GetFileSystemEntries(folderCAnonStorey72.to)).Select<string, string>(new Func<string, string>(folderCAnonStorey72.\u003C\u003Em__FA));
     // ISSUE: reference to a compiler-generated field
     // ISSUE: reference to a compiler-generated method
     IEnumerable<string> second = ((IEnumerable<string>) Directory.GetFileSystemEntries(folderCAnonStorey72.from)).Select<string, string>(new Func<string, string>(folderCAnonStorey72.\u003C\u003Em__FB));
     foreach (string path2 in first.Except<string>(second))
     {
       // ISSUE: reference to a compiler-generated field
       FileMirroring.DeleteFileOrDirectory(Path.Combine(folderCAnonStorey72.to, path2));
     }
     foreach (string path2 in second)
     {
       // ISSUE: reference to a compiler-generated field
       string str1 = Path.Combine(folderCAnonStorey72.from, path2);
       // ISSUE: reference to a compiler-generated field
       string str2 = Path.Combine(folderCAnonStorey72.to, path2);
       FileMirroring.FileEntryType fileEntryType1 = FileMirroring.FileEntryTypeFor(str1);
       FileMirroring.FileEntryType fileEntryType2 = FileMirroring.FileEntryTypeFor(str2);
       if (fileEntryType1 == FileMirroring.FileEntryType.File && fileEntryType2 == FileMirroring.FileEntryType.Directory)
         FileMirroring.DeleteFileOrDirectory(str2);
       if (fileEntryType1 == FileMirroring.FileEntryType.Directory)
       {
         if (fileEntryType2 == FileMirroring.FileEntryType.File)
           FileMirroring.DeleteFileOrDirectory(str2);
         if (fileEntryType2 != FileMirroring.FileEntryType.Directory)
           Directory.CreateDirectory(str2);
         FileMirroring.MirrorFolder(str1, str2);
       }
       if (fileEntryType1 == FileMirroring.FileEntryType.File)
         FileMirroring.MirrorFile(str1, str2, comparer);
     }
   }
 }
示例#2
0
 public static void MirrorFolder(string from, string to, Func <string, string, bool> comparer)
 {
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: variable of a compiler-generated type
     FileMirroring.\u003CMirrorFolder\u003Ec__AnonStorey72 folderCAnonStorey72 = new FileMirroring.\u003CMirrorFolder\u003Ec__AnonStorey72();
     // ISSUE: reference to a compiler-generated field
     folderCAnonStorey72.to = to;
     // ISSUE: reference to a compiler-generated field
     folderCAnonStorey72.from = from;
     // ISSUE: reference to a compiler-generated field
     // ISSUE: reference to a compiler-generated field
     folderCAnonStorey72.from = Path.GetFullPath(folderCAnonStorey72.from);
     // ISSUE: reference to a compiler-generated field
     // ISSUE: reference to a compiler-generated field
     folderCAnonStorey72.to = Path.GetFullPath(folderCAnonStorey72.to);
     // ISSUE: reference to a compiler-generated field
     if (!Directory.Exists(folderCAnonStorey72.from))
     {
         // ISSUE: reference to a compiler-generated field
         if (!Directory.Exists(folderCAnonStorey72.to))
         {
             return;
         }
         // ISSUE: reference to a compiler-generated field
         Directory.Delete(folderCAnonStorey72.to, true);
     }
     else
     {
         // ISSUE: reference to a compiler-generated field
         if (!Directory.Exists(folderCAnonStorey72.to))
         {
             // ISSUE: reference to a compiler-generated field
             Directory.CreateDirectory(folderCAnonStorey72.to);
         }
         // ISSUE: reference to a compiler-generated field
         // ISSUE: reference to a compiler-generated method
         IEnumerable <string> first = ((IEnumerable <string>)Directory.GetFileSystemEntries(folderCAnonStorey72.to)).Select <string, string>(new Func <string, string>(folderCAnonStorey72.\u003C\u003Em__FA));
         // ISSUE: reference to a compiler-generated field
         // ISSUE: reference to a compiler-generated method
         IEnumerable <string> second = ((IEnumerable <string>)Directory.GetFileSystemEntries(folderCAnonStorey72.from)).Select <string, string>(new Func <string, string>(folderCAnonStorey72.\u003C\u003Em__FB));
         foreach (string path2 in first.Except <string>(second))
         {
             // ISSUE: reference to a compiler-generated field
             FileMirroring.DeleteFileOrDirectory(Path.Combine(folderCAnonStorey72.to, path2));
         }
         foreach (string path2 in second)
         {
             // ISSUE: reference to a compiler-generated field
             string str1 = Path.Combine(folderCAnonStorey72.from, path2);
             // ISSUE: reference to a compiler-generated field
             string str2 = Path.Combine(folderCAnonStorey72.to, path2);
             FileMirroring.FileEntryType fileEntryType1 = FileMirroring.FileEntryTypeFor(str1);
             FileMirroring.FileEntryType fileEntryType2 = FileMirroring.FileEntryTypeFor(str2);
             if (fileEntryType1 == FileMirroring.FileEntryType.File && fileEntryType2 == FileMirroring.FileEntryType.Directory)
             {
                 FileMirroring.DeleteFileOrDirectory(str2);
             }
             if (fileEntryType1 == FileMirroring.FileEntryType.Directory)
             {
                 if (fileEntryType2 == FileMirroring.FileEntryType.File)
                 {
                     FileMirroring.DeleteFileOrDirectory(str2);
                 }
                 if (fileEntryType2 != FileMirroring.FileEntryType.Directory)
                 {
                     Directory.CreateDirectory(str2);
                 }
                 FileMirroring.MirrorFolder(str1, str2);
             }
             if (fileEntryType1 == FileMirroring.FileEntryType.File)
             {
                 FileMirroring.MirrorFile(str1, str2, comparer);
             }
         }
     }
 }