code wiki / _hdl_build / nx_fs_gate.nx

nx_fs_gate.nx

buildroot/runtime/_hdl_build/nx_fs_gate.nx

2858 B46 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic fs
docsdependenciesstructsconstsfunctions

about

nx_fs_gate.nx -- SOVEREIGN gate for the nishi file-ops multitool (the coreutils replacement). T1 cp: copy a file, content byte-identical T2 mv: move it, content preserved + source gone T3 rm: remove it, gone T4 mkdir: directory exists afterward license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_fs.nx nx_fs_gate.nx

imports: nx_syscalls.nxnx_fs.nx

imported by: nobody (leaf or entry point)

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

main fs_rm fg_write sys_openat_wr sys_write sys_close fs_cp sys_openat_rd sys_openat_wr ↻ sys_close ↻ sys_mmap sys_read sys_write ↻ fg_read_eq sys_openat_rd ↻ sys_mmap ↻ sys_read ↻ sys_close ↻ fg_uw sys_write ↻ fs_mv sys_renameat fs_cp ↻ fs_rm ↻ fg_exists sys_openat_rd ↻ sys_close ↻ fs_mkdir sys_mkdir fg_isdir sys_close ↻ sys_mmap ↻ sys_write ↻

structs

none

consts

none

functions

10func fg_uw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
11func fg_write(path: *u8, s: *u8, len: i64) -> i64 { let fd: i64=sys_openat_wr(path, 0x1a4); if fd<0 {return 0-1} sys_write(fd,s,len); sys_close(fd); return 0 }
12func fg_read_eq(path: *u8, exp: *u8, explen: i64) -> i64
18func fg_exists(path: *u8) -> i64 { let fd: i64=sys_openat_rd(path); if fd>=0 {sys_close(fd); return 1} return 0 }
called by 1: main calls 2: sys_openat_rdsys_close
19func fg_isdir(path: *u8) -> i64 { let fd: i64=__syscall(257, 0-100, path, 0x10000, 0, 0, 0); if fd>=0 {sys_close(fd); return 1} return 0 }
called by 1: main calls 1: sys_close
21func main(argc: i64, argv: *i64) -> i64