larzfs
Filesystem helpers, without the ceremony.
read/write/append/exists/lines for files, ls for a sorted directory listing, mkdirs/copy/move/rm for the rest - thin, readable wrappers over the language's own OS builtins, not a reimplementation of them.
larzscript pkg install fs
What you get
- read/write/append/exists/lines, one word each
- ls() - sorted directory listing
- mkdirs/copy/move/rm for everything else
- basename()/dirname() path helpers
Try it
import "fs" as fs
fs.write("/tmp/fs_demo.txt", "hello\nworld")
print(fs.read("/tmp/fs_demo.txt"))
print(fs.exists("/tmp/fs_demo.txt"))
print(fs.lines("/tmp/fs_demo.txt"))
print(fs.basename("/a/b/c.txt"), fs.dirname("/a/b/c.txt"))Output
hello world true [hello, world] c.txt /a/b
Why it's in the Larz Stack
larzfs is a real Larzscript package (larzscript pkg install fs) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.