Capy-Bearer Documentation

file_stat

host call

Capy

function file_stat(path : string) dval

Description

file_stat returns metadata for a path. The result includes exists, is_file, is_dir, is_symlink, size, mtime, ctime, and mode.

Parameters

path : path to inspect

Return Values

A dval with file metadata.

Example

Capy

file_put_contents("/tmp/doc-stat.txt", "12345")
var stat := file_stat("/tmp/doc-stat.txt")
print(u64(stat["size"]), "\n")