kotlin-stdlib / kotlin.io.path / java.nio.file.Path / deleteExisting deleteExisting JVM JRE7 1.5 fun Path.deleteExisting()(source) Deletes the existing file or empty directory specified by this path. Exceptions NoSuchFileException - if the file or directory does not exist. DirectoryNotEmptyException - if the directory exists but is not empty. See Also Files.delete