This site permanently moved to
https://droidscript.github.io
. Please update links accordingly.
You are being forwarded automatically in 3...
[stay here]
Back
GetFileSize
JS
Py
Hello World
GetFileSize returns the size of a file or folder in bytes.
app.GetFileSize(
file
) →
Number:
float
Example - Show /sdcard/ folder size
click to expand contents
function
OnStart
(
)
{
var
size
=
app
.
GetFileSize
(
"/sdcard/"
)
;
app
.
Alert
(
size
/
1024
+
" kB"
)
;
}
from
native
import
app
def
OnStart
(
)
:
size
=
app
.
GetFileSize
(
"/sdcard/"
)
app
.
Alert
(
size
/
1024
+
" kB"
)
Copy All
Run
String:
path to file (
“/absolute/...”
or
“relative/...”
)
loading