๐ File and Folder Information
These tools provide info like size or free space for files and folders.
getsizeโ
Returns a fileโs size in bytes.
| Argument | Description |
|---|---|
FILE | File path |
size=$(getsize "/sdcard/test.txt")
ui_print "Size: $size bytes"
getfreeโ
Returns free space in a folder in bytes.
| Argument | Description |
|---|---|
FOLDER | Folder path |
free=$(getfree "/sdcard")
ui_print "Free space: $free bytes"
find_readableโ
Finds readable files using find with custom readability checks.
find_readable <special-opts> find-args
| Special Option | Description |
|---|---|
-bytes | Max bytes to read. |
-min-bytes (-mb) | Min readable bytes. |
-no-params | Disables default -type f. |
find_readable -bytes 100 -mb 20 /sdcard -name "*.txt"
note
Supports all parameters of the find command, because it is a wrapper of this. Although it is mandatory to place the special options at the beginning.