Yuari
Documentation
Docs/File system/getfilesize

getfilesize

Returns a file size in bytes.

Syntax

getfilesize(path: string) -> number

Parameters

ParameterTypeDescription
pathstringA path inside the Yuari workspace.

Returns

TypeDescription
numberA file size in bytes

Description

getfilesize is part of the File system library. File APIs are limited to the Yuari workspace under %LOCALAPPDATA%\Yuari\workspace; absolute paths and traversal outside it are rejected.

The call is read-only: it resolves the current value when invoked and does not change the underlying state.

Example

print(getfilesize("config.txt"))

Notes

  • All paths are confined to %LOCALAPPDATA%\Yuari\workspace.