Method filesystem.moveTo
Overload
Moves file or directory into another directory.
public static void moveTo(string path, string newDirectory, FIfExists ifExists = FIfExists.Fail)
Parameters
path (string)
Full path. |
newDirectory (string)
Full path of the new parent directory. |
ifExists (FIfExists) |
Exceptions
ArgumentException
|
FileNotFoundException
path not found. |
AuException
Failed. |
Remarks
In most cases uses API MoveFileEx. It's fast, because don't need to copy files. In these cases copies/deletes: destination is on another drive; need to merge directories. When need to copy, does not copy security properties; sets default. Creates the destination directory if does not exist (see filesystem.createDirectory).