FileSystem.move

Move / rename a file or a directory. If the destination exists:

  • if it is a non-empty directory, an error is returned
  • otherwise, if it has the same type as the source, it is replaced
  • otherwise, behavior is unspecified (implementation-dependent).
class FileSystem
bool
move
(
string src
,
string dest
)

Parameters

src string

The path of the source file.

dest string

The path of the destination.

Return Value

Type: bool

true on success, false if there was an error.