Files
marqdo/public/features/09-path-fs.mq.md
T
cflmyandCursor 687c168014 feat(parse): use nested YAML import: maps instead of one-liner binds
Frontmatter imports are now valid YAML (`import:` / `导入:` with bind→target
entries), removing spaced keys. Add `marqdo migrate imports`, hard-error the
old one-liner form, and migrate lib/ext/examples/tests/docs accordingly.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-23 19:33:58 +08:00

708 B

title, description, import
title description import
Mid stdlib — path and fs lib/path + fs copy/move/temp (Mid M2)
path fs
lib/path.mq.md lib/fs.mq.md

Path algebra and file mid-layer

Join and normalize without plugins; copy/move stay sandboxed under the program directory.

main

p = > path.join a="out" b="demo.txt" n = > path.normalize path="out/./x/../demo.txt"

fs.write_text path=p text="path-m2" fs.copy_file src=p dest="out/demo-copy.txt" body = > fs.read_text path="out/demo-copy.txt" print text=p print text=n print text=body

  1. body == "path-m2"

print text=mid-m2-ok

print text=mid-m2-fail fs.remove path=p fs.remove path="out/demo-copy.txt"