Skip to content

Commit

Permalink
Add docs for $file.rootPath and $drive.rootPath
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanzhong committed Apr 5, 2021
1 parent cce5bfe commit 381d004
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/en/file/method.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ Returns the absolute path of a relative path:
const absolutePath = $file.absolutePath(path);
```

# $file.rootPath

Returns the root path of the documents folder (in absolute path style):

```js
const rootPath = $file.rootPath;
```

# $file.extensions

Returns all installed scripts:
Expand Down
8 changes: 8 additions & 0 deletions docs/file/method.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ $file.split({
const absolutePath = $file.absolutePath(path);
```

# $file.rootPath

返回文档根目录的文件路径(以绝对路径的形式):

```js
const rootPath = $file.rootPath;
```

# $file.extensions

返回所有安装的 JavaScript extension 文件名:
Expand Down

0 comments on commit 381d004

Please sign in to comment.