feat(stdlib): add bounded std:fs/file read, write and copy
This commit is contained in:
1 parent
8dd3d5eb76
commit
cd90f059b4
9 files changed
+248
-11
No files matched your search
@@ -0,0 +1,16 @@
|
||||
---
|
||||
import:
|
||||
fs: "std:fs/file"
|
||||
---
|
||||
|
||||
## main
|
||||
|
||||
**写入 = fs.写文本("out/fs-a.txt", "你好\n")**
|
||||
|
||||
**读取 = fs.读文本("out/fs-a.txt")**
|
||||
|
||||
**复制 = fs.复制文件("out/fs-a.txt", "out/fs-b.txt")**
|
||||
|
||||
**复制读取 = fs.读文本("out/fs-b.txt")**
|
||||
|
||||
*[写入.value.count, 读取.value, 复制.value.count, 复制读取.value]*
|
||||
Reference in new issue
Block a user