code wiki / (root) / nx_fsops.nx

nx_fsops.nx

buildroot/runtime/nx_fsops.nx

3536 B74 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind tooltopic fsops
docsdependenciesstructsconstsfunctions

about

nx_fsops.nx -- CLI half of the consolidated filesystem tool (MCP name: nx_fs, tool #4 of the 15). (Source named nx_fsops because nx_fs.nx is the file-I/O STDLIB.) READ-ONLY increment: read <path> [maxbytes] [offset] -> bytes to stdout (truncation MARKED); DENY-LIST refuses secrets lines <path> <start> [count] -> LINE-ADDRESSED window + declared envelope; composes with grep's file:LINE output (the pair that byte-offset reads could not do) ls <dir> -> "<t> <name>" per entry (d/f/l/o) exit: 0 ok | 3 absent | 5 DENIED | 2 usage (codes surface in MCP _meta.exit_code) license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_fsops_lib.nx nx_fsops_outline.nx nx_fsops.nx

imports: nx_fsops_lib.nxnx_fsops_outline.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main fsx_puts sys_write fsx_seq fsc_atoi fsx_read_at fsx_denied sys_mmap fsx_lower fsx_ends_with vw_slen fsx_basename_is vw_slen ↻ fsx_ends_with ↻ fsx_deny_hit vw_slen ↻ vw_contains fsx_content_secret sys_openat_rd sys_mmap ↻ sys_read sys_close vw_contains ↻ fsx_conf_deny sys_mmap ↻ vw_read sys_openat_rd ↻ sys_read ↻ sys_close ↻ fsx_deny_hit ↻ fsx_puts ↻ sys_openat_rd ↻ fsx_fail sys_close ↻ fsx_puts ↻ fsx_putn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num

structs

none

consts

12const FSC_USAGE_RC: i64 = 2
13const FSC_ARG_VERB: i64 = 1 // argv slot of the verb
14const FSC_ARG_P1: i64 = 2 // argv slot of the path
15const FSC_ARG_P2: i64 = 3 // argv slot of the optional maxbytes
16const FSC_ARGC_P1: i64 = 3 // argc with a path
17const FSC_ARGC_P2: i64 = 4 // argc with path + maxbytes
18const FSC_ASCII_9: i64 = 57 // '9' (decimal parse upper bound)

functions

20func fsc_atoi(s: *u8) -> i64
called by 1: main
33func main(argc: i64, argv: *i64) -> i64