文档中的步骤
结构步骤(非实际执行时序)
marqdo
make_dirs / remove_tree / stat / walk thicken lib/fs for scripts and tools.
access(`st`, "size")| size | 2 |
| mtime_unix | 1793515724 |
| is_file | True |
| is_dir | False |
| key | value |
|---|---|
| size | 2 |
| mtime_unix | 1793515724 |
| is_file | True |
| is_dir | False |
| # | value |
|---|---|
| 1 | readme.txt |
| 2 | sub |
| # | value |
|---|---|
| 1 | readme.txt |
| 2 | sub |
--- markup: occlusion 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=[size](access(`st`, "size")) **w = > fs.walk path="m9-demo"** **n = > len `w`** > print text=`n` > fs.remove_tree path="m9-demo"