code wiki / _hdl_build / nx_galx_repath.nx

nx_galx_repath.nx

buildroot/runtime/_hdl_build/nx_galx_repath.nx

2804 B75 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic galx
docsdependenciesstructsconstsfunctions

about

nx_galx_repath.nx -- SOVEREIGN substring replacer for one-time storage repath (local C: -> NAS). Reads <infile> fully into memory, replaces every occurrence of <find> with <repl>, writes the result to <outfile>.tmp then sys_renameat()s it over <outfile> (atomic -- a live reader never sees a torn file). Used to repoint the gallery sidecar (CID\tpath) + corpus list from /mnt/c/.../data-vault/images to /mnt/nas_ai/images so the heavy image storage is served off the NAS, not the local machine. All logic NishiLang. Usage: nx_galx_repath <in> <out> <find> <repl> license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_galx_repath.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main rp_len sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_openat_wr sys_write sys_close ↻ sys_renameat

structs

none

consts

9const K_MAGIC_1048576: i64 = 1048576
10const K_MAGIC_1024: i64 = 1024

functions

12func rp_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: main
14func main(argc: i64, argv: *i64) -> i64