diff --git a/docs/reference/model/file.md b/docs/reference/model/file.md index a1e5af61..c2b02308 100644 --- a/docs/reference/model/file.md +++ b/docs/reference/model/file.md @@ -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. diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/model/file.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/model/file.md index 3658280e..90e3d518 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/model/file.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/model/file.md @@ -83,3 +83,9 @@ weight: 100 `read_env(key: str) -> str` 从当前进程中读取环境变量 `key` 的值。 + +## current + +`current() -> str` + +读取正在执行的当前 KCL 代码文件或模块的路径。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.10/reference/model/file.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.10/reference/model/file.md index 3658280e..90e3d518 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.10/reference/model/file.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.10/reference/model/file.md @@ -83,3 +83,9 @@ weight: 100 `read_env(key: str) -> str` 从当前进程中读取环境变量 `key` 的值。 + +## current + +`current() -> str` + +读取正在执行的当前 KCL 代码文件或模块的路径。 diff --git a/versioned_docs/version-0.10/reference/model/file.md b/versioned_docs/version-0.10/reference/model/file.md index a1e5af61..c2b02308 100644 --- a/versioned_docs/version-0.10/reference/model/file.md +++ b/versioned_docs/version-0.10/reference/model/file.md @@ -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.