Documentation home / Native Module API
Native Module API
Text File Operations
Check file existence, read/write/append text and inspect file size.
Purpose
Check file existence, read/write/append text and inspect file size.
Exports registered by the module initializer
| Export | Role |
|---|---|
exists | exists helper |
read_text | read text helper |
write_text | write text helper |
append_text | append text helper |
size | size helper |
Usage
import gs_file; define path = "/tmp/gsfe-note.txt"; gs_file.write_text(path, "hello\n"); gs_file.append_text(path, "second line\n"); print(gs_file.read_text(path)); print(gs_file.size(path));
Uses operating-system permissions of the greenServeFE process. This module is not a sandbox; never pass untrusted paths without validation.
Related: Module catalog · Native ABI · Language guide.
greenServeFE