withSIX.Play.Core.Games.Legacy.PathMover.MoveModFolders C# (CSharp) Method

MoveModFolders() public method

public MoveModFolders ( IAbsoluteDirectoryPath oldModsPath, IAbsoluteDirectoryPath newModsPath ) : void
oldModsPath IAbsoluteDirectoryPath
newModsPath IAbsoluteDirectoryPath
return void
        public void MoveModFolders(IAbsoluteDirectoryPath oldModsPath, IAbsoluteDirectoryPath newModsPath) {
            newModsPath.MakeSurePathExists();

            foreach (var dir in Directory.EnumerateDirectories(oldModsPath.ToString())
                .Where(x => !excludeFolders.Contains(Path.GetFileName(x).ToLower()))
                .Where(x => File.Exists(Path.Combine(x, Package.SynqInfoFile)) ||
                            Directory.Exists(Path.Combine(x, Repository.RepoFolderName))))
                TryMoveDir(dir.ToAbsoluteDirectoryPath(), newModsPath);
        }