Miguel Oliveira
01/02/2024, 11:39 PMFileSystem::delete
does not work for that, as documented.Filipp Zhinkin
01/03/2024, 4:54 PMMichael Paus
05/12/2024, 5:41 PMZhang Zihan
05/12/2024, 6:11 PMfun FileSystem.deleteRecursively(path: Path, mustExist: Boolean = true) {
if (metadataOrNull(path)?.isDirectory == true) {
list(path).forEach {
deleteRecursively(it, false)
}
}
delete(path, mustExist)
}
Miguel Oliveira
05/12/2024, 11:23 PM