mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-06-05 22:09:15 +02:00
move the library files in a separate folder + misc changes
- dont do such commits at home
This commit is contained in:
@ -0,0 +1,19 @@
|
||||
package com.simplemobiletools.filepicker.models
|
||||
|
||||
class FileDirItem(val path: String, val name: String, val isDirectory: Boolean, val children: Int, val size: Long) :
|
||||
Comparable<FileDirItem> {
|
||||
|
||||
override fun compareTo(other: FileDirItem): Int {
|
||||
if (isDirectory && !other.isDirectory) {
|
||||
return -1
|
||||
} else if (!isDirectory && other.isDirectory) {
|
||||
return 1
|
||||
}
|
||||
|
||||
return name.toLowerCase().compareTo(other.name.toLowerCase())
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "FileDirItem{name=$name, isDirectory=$isDirectory, path=$path, children=$children, size=$size}"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user