mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-02-17 04:10:39 +01:00
small Utils cleanup
This commit is contained in:
parent
065de047b3
commit
3812023561
@ -7,17 +7,11 @@ import com.simplemobiletools.filepicker.extensions.toast
|
||||
|
||||
class Utils {
|
||||
companion object {
|
||||
fun getFilename(path: String): String {
|
||||
return path.substring(path.lastIndexOf("/") + 1)
|
||||
}
|
||||
fun getFilename(path: String) = path.substring(path.lastIndexOf("/") + 1)
|
||||
|
||||
fun getFileExtension(fileName: String): String {
|
||||
return fileName.substring(fileName.lastIndexOf(".") + 1, fileName.length).toLowerCase()
|
||||
}
|
||||
fun getFileExtension(fileName: String) = fileName.substring(fileName.lastIndexOf(".") + 1, fileName.length).toLowerCase()
|
||||
|
||||
fun showToast(context: Context, resId: Int) {
|
||||
context.toast(resId)
|
||||
}
|
||||
fun showToast(context: Context, resId: Int) = context.toast(resId)
|
||||
|
||||
fun needsStupidWritePermissions(context: Context, path: String) = context.needsStupidWritePermissions(path)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user