code wiki / _hdl_build / nx_fileop_intent_20260910.nx

nx_fileop_intent_20260910.nx

buildroot/runtime/_hdl_build/nx_fileop_intent_20260910.nx

5897 B77 linesdepth 7pulls 8 transitivereach 0 importersview sourcekind tooltopic fileop
docsdependenciesstructsconstsfunctions

about

nx_fileop.nx -- sovereign file-op CLI (retires Remove-Item / mv). Composes the canonical nx_fio + nx_syscalls's sys_renameat. Usage: nx_fileop rm <path> delete a file (refuses empty / "/" ) nx_fileop mv <src> <dst> atomic rename (sys_renameat) nx_fileop exists <path> existence check (exit 0 if present, 3 if absent) nx_fileop prepare-install-intent INTENT SOURCE LIVE CANDIDATE BACKUP NEW_SHA256 OLD_SHA256 MODE_DECIMAL BUDGET_BYTES Creates or verifies an identical immutable intent; never publishes an artifact. No shell. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_file_install.nx nx_gate.nx nx_fileop_intent_20260910.nx

imports: nx_file_install.nxnx_gate.nx

imported by: nobody (leaf or entry point)

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

main fo_streq fo_prepare_intent fo_intent_error gw sys_write gn sys_write ↻ sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable nxa_dump_sizes fi_plan_init fi_path_valid fo_streq ↻ fo_digest fi_len fo_decimal fi_plan_create fi_paths_distinct fi_path_valid ↻ fi_len ↻ fi_same fi_len ↻ fi_copy fi_word_put fio_write_sync_fd sys_write ↻ sys_fsync sys_close fio_sync_parent

structs

none

consts

none

functions

12func fo_streq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8) { if a[i]!=b[i] { return 0 } i=i+1 } if b[i]!=(0 as u8) { return 0 } return 1 }
13func fo_bad_path(p: *u8) -> i64 { if p[0]==(0 as u8) { return 1 } if p[0]==(0x2f as u8) { if p[1]==(0 as u8) { return 1 } } return 0 }
called by 1: main
15func main(argc: i64, argv: *i64) -> i64
44func fo_intent_error(stage:*u8,code:i64)->i64
called by 1: fo_prepare_intent calls 2: gwgn
47func fo_decimal(s:*u8,max:i64,out:*i64)->i64
called by 1: fo_prepare_intent
52func fo_digest(s:*u8,out:*u8)->i64
called by 1: fo_prepare_intent calls 1: fi_len
58func fo_plan_matches(p:*NxFileInstallPlan,argv:*i64,newhash:*u8,oldhash:*u8,mode:i64)->i64
called by 1: fo_prepare_intent calls 2: fo_streqfi_same
61func fo_prepare_intent(argc:i64,argv:*i64)->i64