delete

expect abstract fun delete(path: Path, mustExist: Boolean = false)

Deletes the file or directory at path.

Parameters

mustExist

true to throw an IOException if there is nothing at path to delete.

Throws

if there is a file or directory but it could not be deleted. Deletes fail if the current process doesn't have access, if the file system is readonly, or if path is a non-empty directory. This list of potential problems is not exhaustive.

actual abstract fun delete(path: Path, mustExist: Boolean)
fun delete(path: Path)
actual abstract fun delete(path: Path, mustExist: Boolean)
actual abstract fun delete(path: Path, mustExist: Boolean)
actual abstract fun delete(path: Path, mustExist: Boolean)