btv.fs_local
btv.fs_local.exists(path)
btv.fs_local.exists(path) -> promise of boolean.
Defined in localseam.lua.
btv.fs_local.readdir(path)
btv.fs_local.readdir(path) -> promise of { { name, type }, … }.
Defined in localseam.lua.
btv.fs_local.read_text(path, opts)
btv.fs_local.read_text(path[, { encoding = "utf-8" }]) -> promise of the decoded
text. encoding selects the decoder exactly as in btv.fs.read_text (which
REJECTS on invalid input rather than substituting replacement characters).
Defined in localseam.lua.
btv.fs_local.write(path, data)
btv.fs_local.write(path, data) -> promise; writes data, replacing the file.
Defined in localseam.lua.
btv.fs_local.append(path, data)
btv.fs_local.append(path, data) -> promise; appends data to the file.
Defined in localseam.lua.
btv.fs_local.mkdir(path, opts)
btv.fs_local.mkdir(path[, { recursive, mode }]) -> promise; creates the directory.
mode is the Unix permission bits, exactly as in btv.fs.mkdir — pass it to keep a
private local store (a trust/credential dir) from being created world-readable.
Defined in localseam.lua.
btv.fs_local.rename(from, to)
btv.fs_local.rename(from, to) -> promise (resolves nil). Atomic on a POSIX
filesystem, so a write-temp-then-rename gives a torn-read-free local update.
Defined in localseam.lua.
btv.fs_local.realpath(path)
btv.fs_local.realpath(path) -> promise of the canonical absolute path.
Defined in localseam.lua.
btv.fs_local.remove(path, opts)
btv.fs_local.remove(path[, { recursive }]) -> promise; removes the file/dir.
Defined in localseam.lua.