Skip to content

Commit ffe985c

Browse files
authored
Merge pull request #378 from Peefy/file-read-env-doc
docs: add reference documents for the `file.read_env` function
2 parents 52f8ad8 + 4a6e569 commit ffe985c

File tree

5 files changed

+25
-1
lines changed

5 files changed

+25
-1
lines changed

docs/reference/model/file.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,9 @@ Copy a file or directory from the source path to the destination path.
6565
`mv(src: str, dest: str)`
6666

6767
Move a file or directory from the source path to the destination path.
68+
69+
## read_env
70+
71+
`read_env(key: str) -> str`
72+
73+
Read the environment variable `key` from the current process.

i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/model/file.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,9 @@ weight: 100
7777
`write(filepath: str, content: str)`
7878

7979
将内容写入指定路径的文件。如果文件不存在,将会被创建。如果文件存在,其内容将被替换。
80+
81+
## read_env
82+
83+
`read_env(key: str) -> str`
84+
85+
从当前进程中读取环境变量 `key` 的值。

i18n/zh-CN/docusaurus-plugin-content-docs/version-0.9/reference/model/file.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,9 @@ weight: 100
7777
`write(filepath: str, content: str)`
7878

7979
将内容写入指定路径的文件。如果文件不存在,将会被创建。如果文件存在,其内容将被替换。
80+
81+
## read_env
82+
83+
`read_env(key: str) -> str`
84+
85+
从当前进程中读取环境变量 `key` 的值。

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "kcl-website",
3-
"version": "0.8.0",
3+
"version": "0.9.0",
44
"private": true,
55
"scripts": {
66
"docusaurus": "docusaurus",

versioned_docs/version-0.9/reference/model/file.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,9 @@ Copy a file or directory from the source path to the destination path.
6565
`mv(src: str, dest: str)`
6666

6767
Move a file or directory from the source path to the destination path.
68+
69+
## read_env
70+
71+
`read_env(key: str) -> str`
72+
73+
Read the environment variable `key` from the current process.

0 commit comments

Comments
 (0)