Files
marqdo/public/features/16-fs-mid2.mq.md
T
cflmyandCursor 955834e453 feat(stdlib): Mid2 M9 fs make_dirs, walk, and stat
Thicken lib/fs with recursive mkdir/rmdir-tree, metadata maps, and
depth-first walk; add gold tests and public demos.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 09:27:06 +08:00

25 lines
531 B
Markdown

---
title: Mid stdlib — fs make_dirs, walk, stat
description: Recursive dirs, walk, and file metadata (Mid2 M9)
import fs:lib/fs.mq.md
---
# Practical filesystem without plugins
`make_dirs` / `remove_tree` / `stat` / `walk` thicken `lib/fs` for scripts and tools.
# main
> fs.make_dirs path="m9-demo/sub"
> fs.write_text path="m9-demo/readme.txt" text="ok"
*st = > fs.stat path="m9-demo/readme.txt"*
> print text=`st`[^size]
*w = > fs.walk path="m9-demo"*
*n = > len `w`*
> print text=`n`
> fs.remove_tree path="m9-demo"