moveTo
Moves or renames the file located by this path to the target path.
Since Kotlin
1.5Parameters
options specifying how the move should be done, see StandardCopyOption, LinkOption.
See also
Throws
if the target file exists but cannot be replaced because the StandardCopyOption.REPLACE_EXISTING option is not specified (optional specific exception).
the StandardCopyOption.REPLACE_EXISTING option is specified but the file cannot be replaced because it is a non-empty directory, or the source is a non-empty directory containing entries that would be required to be moved (optional specific exception).
Moves or renames the file located by this path to the target path.
Since Kotlin
1.5Parameters
allows to overwrite the target if it already exists.
See also
Throws
if the target file exists but cannot be replaced because the overwrite = true
option is not specified (optional specific exception).
the overwrite = true
option is specified but the file cannot be replaced because it is a non-empty directory, or the source is a non-empty directory containing entries that would be required to be moved (optional specific exception).