use the extension function for checking root folders
This commit is contained in:
parent
511fc5e420
commit
04e3ea1fb2
1 changed files with 1 additions and 4 deletions
|
@ -111,10 +111,7 @@ class Utils {
|
|||
}
|
||||
}
|
||||
|
||||
fun isAStorageRootFolder(context: Context, path: String): Boolean {
|
||||
val trimmed = path.trimEnd('/')
|
||||
return trimmed.isEmpty() || trimmed == context.getInternalStoragePath() || trimmed == context.getSDCardPath()
|
||||
}
|
||||
fun isAStorageRootFolder(context: Context, path: String) = context.isAStorageRootFolder(path)
|
||||
|
||||
fun isPhotoVideo(file: File) = file.isPhotoVideo()
|
||||
|
||||
|
|
Loading…
Reference in a new issue