Skip to content

file.info

JoeStrout edited this page Sep 11, 2026 · 3 revisions

Get a map of info (path, isDirectory, size, date) about the given path

Parameters

Parameter Default Value Note
path

Return value

Condition Return Value
(always) number

Notes

Returns null if there is nothing at the given path.

The returned path is the canonical form of the path you gave: the absolute host path normally, or the virtual path once enterSandbox has been called. Sandboxed, no host path is ever reported.

Example

import "file"
info = file.info("data.txt")
print info.size        // file size in bytes
print info.isDirectory // 0 for files, 1 for directories

Clone this wiki locally