Applying changed Download routines

This commit is contained in:
Pupil
2020-01-31 10:12:44 +09:00
parent 615b52c4fa
commit 48f90faf4e
18 changed files with 428 additions and 341 deletions

View File

@@ -64,4 +64,4 @@ fun URL.download(to: File, onDownloadProgress: ((Long, Long) -> Unit)? = null) {
}
}
fun File.isParentOf(file: File) = file.absolutePath.startsWith(this.absolutePath)
fun File.isParentOf(file: File?) = file?.absolutePath?.startsWith(this.absolutePath) ?: false