nx_file_result.nx
buildroot/runtime/nx_file_result.nx
about
nx_file_result.nx -- Result-wrapped file read.
sys_read_file returns null on failure -- a sentinel. This wrapper
returns *NxResult so callers get a proper error code (NX_ERR_FILE_
NOT_FOUND) instead of "is this null?" inspection.
Convention: result.value holds *u8 cast to nx_int (file buffer);
callers cast back via `as *u8`. Length stored in out parameter.
dependencies 4 imports · 8 importers
imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_result.nx
imported by: nx_avatar_solve_test.nxnx_casc_runner_test.nxnx_file_result_test.nxnx_smtlib_parse.nxnx_tptp_load.nxnx_tptp_load_any.nxnx_tptp_load_test.nxnx_tptp_write_test.nx
structs
| none |
consts
| none |
functions
| 23 | func nx_read_file_result(path: *u8, out_len: *i64) -> *NxResult |
| 31 | func nx_count_lines_result(path: *u8) -> *NxResult |