src/Fs.bend relies on unsafe/foreign
raw source on the hub · import mylsm-lsm-store@0.3.2.0/src/Fs.bend as Fs
1 import
import Base
Definitions
def grab_name source · line 52 · raw
@nm:String -> @acc:List<&1, String> -> List<&1, String>
def read_go source · line 62 · raw
@fuel:Nat -> @+path:String -> @+idx:Nat -> @acc:List<&1, String> -> IO(List<&1, String>)
def read_dir source · line 71 · raw
@+path:String -> IO(Result<&1, &1, Pair(U32, String), List<&1, String>>)
Effects (foreign code)
effect fsync source · line 6 · raw
@path:String -> IO(Result<&1, &1, Pair(U32, String), Unit>)
foreign: src/effs/fsync.c, src/effs/fsync.js
effect rename source · line 10 · raw
@old:String -> @new:String -> IO(Result<&1, &1, Pair(U32, String), Unit>)
foreign: src/effs/rename.c, src/effs/rename.js
effect remove source · line 14 · raw
@path:String -> IO(Result<&1, &1, Pair(U32, String), Unit>)
foreign: src/effs/remove.c, src/effs/remove.js
effect read_dir_count source · line 18 · raw
@path:String -> IO(Result<&1, &1, Pair(U32, String), Nat>)
foreign: src/effs/read_dir.c, src/effs/read_dir.js
effect read_dir_at source · line 22 · raw
@path:String -> @idx:Nat -> IO(Result<&1, &1, Pair(U32, String), String>)
foreign: src/effs/read_dir.c, src/effs/read_dir.js
effect make_dir source · line 26 · raw
@path:String -> IO(Result<&1, &1, Pair(U32, String), Unit>)
foreign: src/effs/make_dir.c, src/effs/make_dir.js
effect chmod source · line 30 · raw
@path:String -> @bits:U32 -> IO(Result<&1, &1, Pair(U32, String), Unit>)
foreign: src/effs/chmod.c, src/effs/chmod.js
effect exists source · line 34 · raw
@path:String -> IO(Result<&1, &1, Pair(U32, String), Bool>)
foreign: src/effs/exists.c, src/effs/exists.js
effect file_size source · line 39 · raw
@path:String -> IO(Result<&1, &1, Pair(U32, String), Nat>)
Read-only byte size for Bend-side accounting (no shell wc needed).
foreign: src/effs/file_size.c, src/effs/file_size.js
effect read_utf8_chunk source · line 45 · raw
@path:String -> @offset:Nat -> @max_bytes:Nat -> IO(Result<&1, &1, Pair(U32, String), String>)
Returns <byte-count>;<text> for a positional chunk whose end is adjusted to
a complete UTF-8 boundary. The byte count advances the next positional read.
foreign: src/effs/read_utf8_chunk.c, src/effs/read_utf8_chunk.js