Beispiel #1
0
 private static void SyncFolders(string src, string dst, Glob[] includes, Glob[] excludes)
 {
     SimpleFolderSync.CopyNewOrChangedFiles(src, dst, includes, excludes);
     SimpleFolderSync.CopyNewOrChangedFolders(src, dst, includes, excludes);
     SimpleFolderSync.DeleteRemovedFiles(src, dst);
     SimpleFolderSync.DeleteRemovedFolders(src, dst);
 }
Beispiel #2
0
        public static void SyncFolders(string src, string dst, StringCollection includeGlobs, StringCollection excludeGlobs)
        {
            Glob[] includes;
            Glob[] excludes;

            includes = GlobMatcher.PrepareGlobs(includeGlobs);
            excludes = GlobMatcher.PrepareGlobs(excludeGlobs);

            SimpleFolderSync.SyncFolders(src, dst, includes, excludes);
        }
Beispiel #3
0
        private static void CopyNewOrChangedFolders(string src, string dst, Glob[] includes, Glob[] excludes)
        {
            foreach (string srcFolder in Directory.EnumerateDirectories(src))
            {
                string name;
                string dstFolder;

                name      = Path.GetFileName(srcFolder);
                dstFolder = Path.Combine(dst, name);

                if (name != ".svn")
                {
                    SimpleFolderSync.SyncFolders(srcFolder, dstFolder, includes, excludes);
                }
            }
        }