replaceFile

fun replaceFile(sourceFile: File, destinationFile: File): Boolean

Move a file from source to destination, and replace the destination file if it exists.

Return

Returns true if the file was successfully replaced.

Author

Griefed

Parameters

sourceFile

The source file.

destinationFile

The destination file to be replaced by the source file.

Throws

Thrown if an error occurs when the file is moved.