Show / Hide Table of Contents

Method filesystem.rename


Overload

Renames file or directory.

public static void rename(string path, string newName, FIfExists ifExists = FIfExists.Fail)
Parameters
path  (string)

Full path.

newName  (string)

New name without path. Example: "name.txt".

ifExists  (FIfExists)
Exceptions
ArgumentException
  • path is not full path (see pathname.isFullPath).
  • newName is invalid filename.
FileNotFoundException

path not found.

AuException

Failed.

Remarks

Uses API MoveFileEx.