public static ProcessorSettings CreateDefault()
        {
            ProcessorSettings ret = new ProcessorSettings();

            ret.Recursive       = true;
            ret.OrderFiles      = true;
            ret.OrderFolders    = true;
            ret.UseStoredHashes = true;

            return(ret);
        }
        private static void ProcessPath(string parent, ProcessorSettings settings, bool topLevel)
        {
            parent = NormalizePath(parent);
            // check dir
            if (System.IO.Directory.Exists(parent) == false)
            {
                Output.Print("Folder " + parent + " does not exist.");
                Output.Print("\t... skipped.");
                return;
            }

            if (topLevel && settings.UseStoredHashes)
            {
                HashManager.TryLoadHashes(parent);
            }

            if (settings.OrderFolders)
            {
                FolderMover.ProcessFolder(parent);
            }

            if (settings.OrderFiles)
            {
                FilesMover.ProcessFolder(parent);
            }

            if (settings.Recursive)
            {
                var dirs = System.IO.Directory.GetDirectories(parent);
                foreach (var dir in dirs)
                {
                    Processor.ProcessPath(dir, settings, false);
                }
            }

            if (topLevel)
            {
                HashManager.TrySaveHashes(parent);
            }
        }
 public static void ProcessPath(string path, ProcessorSettings settings)
 {
     ProcessPath(path, settings, true);
 }