deleteExisting

inline fun Path.deleteExisting()(source)

Deletes the existing file or empty directory specified by this path.

Since Kotlin

1.5

See also

Throws

if the file or directory does not exist.

if the directory exists but is not empty.