提交 2547b277 编写于 作者: E ester.zhou

update doc (9096)

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 94cfda62
# Environment # Environment
This module provides JS APIs for obtaining the root directories of the storage and public files. The **Environment** module provides APIs for obtaining the root directories of the storage and public files.
> **NOTE** > **NOTE**
> >
...@@ -21,13 +21,13 @@ Obtains the root directory of the storage. This API uses a promise to return the ...@@ -21,13 +21,13 @@ Obtains the root directory of the storage. This API uses a promise to return the
**System capability**: SystemCapability.FileManagement.File.Environment **System capability**: SystemCapability.FileManagement.File.Environment
- Return value **Return value**
| Type | Description | | Type | Description |
| --------------------- | ---------------- | | --------------------- | ---------------- |
| Promise&lt;string&gt; | Promise returned with the root directory of the storage.| | Promise&lt;string&gt; | Promise returned with the root directory of the storage.|
- Example **Example**
```js ```js
environment.getStorageDataDir().then(function(path){ environment.getStorageDataDir().then(function(path){
...@@ -45,13 +45,13 @@ Obtains the root directory of the storage. This API uses an asynchronous callbac ...@@ -45,13 +45,13 @@ Obtains the root directory of the storage. This API uses an asynchronous callbac
**System capability**: SystemCapability.FileManagement.File.Environment **System capability**: SystemCapability.FileManagement.File.Environment
- Parameters **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | --------------------------- | ---- | -------------------------------- | | -------- | --------------------------- | ---- | -------------------------------- |
| callback | AsyncCallback&lt;string&gt; | Yes | Asynchronous callback used to return the root directory of the storage.| | callback | AsyncCallback&lt;string&gt; | Yes | Asynchronous callback used to return the root directory of the storage.|
- Example **Example**
```js ```js
environment.getStorageDataDir(function(error, path){ environment.getStorageDataDir(function(error, path){
...@@ -67,13 +67,13 @@ Obtains the root directory of public files. This API uses a promise to return th ...@@ -67,13 +67,13 @@ Obtains the root directory of public files. This API uses a promise to return th
**System capability**: SystemCapability.FileManagement.File.Environment **System capability**: SystemCapability.FileManagement.File.Environment
- Return value **Return value**
| Type | Description | | Type | Description |
| --------------------- | ------------------ | | --------------------- | ------------------ |
| Promise&lt;string&gt; | Promise returned with the root directory of public files.| | Promise&lt;string&gt; | Promise returned with the root directory of public files.|
- Example **Example**
```js ```js
environment.getUserDataDir().then(function(path){ environment.getUserDataDir().then(function(path){
...@@ -91,13 +91,13 @@ Obtains the root directory of public files. This API uses an asynchronous callba ...@@ -91,13 +91,13 @@ Obtains the root directory of public files. This API uses an asynchronous callba
**System capability**: SystemCapability.FileManagement.File.Environment **System capability**: SystemCapability.FileManagement.File.Environment
- Parameters **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | --------------------------- | ---- | -------------------------------- | | -------- | --------------------------- | ---- | -------------------------------- |
| callback | AsyncCallback&lt;string&gt; | Yes | Asynchronous callback used to return the root directory of public files.| | callback | AsyncCallback&lt;string&gt; | Yes | Asynchronous callback used to return the root directory of public files.|
- Example **Example**
```js ```js
environment.getUserDataDir(function(error, path){ environment.getUserDataDir(function(error, path){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册