726 B
726 B
markup, title, description, import
| markup | title | description | import | ||||
|---|---|---|---|---|---|---|---|
| occlusion | Mid stdlib — path and fs | lib/path + fs copy/move/temp (Mid M2) |
|
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=
ptext="path-m2" fs.copy_file src=pdest="out/demo-copy.txt"body= > fs.read_text path="out/demo-copy.txt" print text=pprint text=nprint text=body
body== "path-m2"
print text=mid-m2-ok
print text=mid-m2-fail fs.remove path=
pfs.remove path="out/demo-copy.txt"