Skip to content

Commit

Permalink
Merge pull request #449 from Peefy/docs-file-current-function
Browse files Browse the repository at this point in the history
docs: add file.current function documents
  • Loading branch information
Peefy authored Aug 26, 2024
2 parents 07a93fd + 1b560d8 commit 1732bb2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/reference/model/file.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,9 @@ Move a file or directory from the source path to the destination path.
`read_env(key: str) -> str`

Read the environment variable `key` from the current process.

## current

`current() -> str`

Read the path of the current script or module that is being executed.
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,9 @@ weight: 100
`read_env(key: str) -> str`

从当前进程中读取环境变量 `key` 的值。

## current

`current() -> str`

读取正在执行的当前 KCL 代码文件或模块的路径。
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,9 @@ weight: 100
`read_env(key: str) -> str`

从当前进程中读取环境变量 `key` 的值。

## current

`current() -> str`

读取正在执行的当前 KCL 代码文件或模块的路径。
6 changes: 6 additions & 0 deletions versioned_docs/version-0.10/reference/model/file.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,9 @@ Move a file or directory from the source path to the destination path.
`read_env(key: str) -> str`

Read the environment variable `key` from the current process.

## current

`current() -> str`

Read the path of the current script or module that is being executed.

0 comments on commit 1732bb2

Please sign in to comment.