AcTools.Utils.FileUtils.Move C# (CSharp) Method

Move() public static method

Move directory or file
public static Move ( string from, string to ) : void
from string
to string
return void
        public static void Move(string from, string to) {
            if (string.Equals(from, to, StringComparison.Ordinal)) return;

            EnsureFileDirectoryExists(to);
            if (File.GetAttributes(from).HasFlag(FileAttributes.Directory)) {
                Directory.Move(from, to);
            } else {
                File.Move(from, to);
            }
        }