File tree Expand file tree Collapse file tree 2 files changed +63
-0
lines changed
i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/model Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ title : " file"
3+ linkTitle : " file"
4+ type : " docs"
5+ description : file system functions
6+ weight : 100
7+ ---
8+
9+ ## read
10+
11+ ` read(filepath: string) -> str `
12+
13+ Read the contents of the file ` filepath ` and return a string instance.
14+
15+ ## glob
16+
17+ ` glob(pattern: str) -> str `
18+
19+ Return a list containing all file names that match ` pattern ` .
20+
21+ ## modpath
22+
23+ ` modpath() -> str `
24+
25+ Return the root path of the current KCL module (kcl.mod file path or single * .k file path).
26+
27+ ## workdir
28+
29+ ` workdir() -> str `
30+
31+ Return the path of the current working directory.
Original file line number Diff line number Diff line change 1+ ---
2+ title : " file"
3+ linkTitle : " file"
4+ type : " docs"
5+ description : 文件系统操作
6+ weight : 100
7+ ---
8+
9+ ## read
10+
11+
12+ ` read(filepath: string) -> str `
13+
14+ 读取文件 ` filepath ` 中的内容,并返回一个字符串实例。
15+
16+ ## glob
17+
18+ ` glob(pattern: str) -> str `
19+
20+ 返回一个包含所有匹配 ` pattern ` 的文件名的列表。
21+
22+ ## modpath
23+
24+ ` modpath() -> str `
25+
26+ 返回当前模块的根路径(kcl.mod 文件路径或单个 * .k 文件路径)。
27+
28+ ## workdir
29+
30+ ` workdir() -> str `
31+
32+ 返回当前工作目录的路径。
You can’t perform that action at this time.
0 commit comments