deleteRecursively

expect open fun deleteRecursively(fileOrDirectory: Path, mustExist: Boolean = false)

Recursively deletes all children of fileOrDirectory if it is a directory, then deletes fileOrDirectory itself.

This function does not defend against race conditions. For example, if child files are created or deleted in fileOrDirectory while this function is executing, this may fail with an IOException.

Parameters

mustExist

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

Throws

if any metadata, list, or delete operation fails.

actual open fun deleteRecursively(fileOrDirectory: Path, mustExist: Boolean)
fun deleteRecursively(fileOrDirectory: Path)
actual open fun deleteRecursively(fileOrDirectory: Path, mustExist: Boolean)
actual open fun deleteRecursively(fileOrDirectory: Path, mustExist: Boolean)
actual open fun deleteRecursively(fileOrDirectory: Path, mustExist: Boolean)