diff --git a/en/application-dev/reference/apis/js-apis-environment.md b/en/application-dev/reference/apis/js-apis-environment.md index d023cdc8403d028ff250d3ea7afa82858d6ad5b8..3f879c77b9ef5cc9427ff5ac74b5758769ddb70f 100644 --- a/en/application-dev/reference/apis/js-apis-environment.md +++ b/en/application-dev/reference/apis/js-apis-environment.md @@ -1,6 +1,6 @@ # 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** > @@ -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 -- Return value +**Return value** - | Type | Description | - | --------------------- | ---------------- | - | Promise<string> | Promise returned with the root directory of the storage.| +| Type | Description | +| --------------------- | ---------------- | +| Promise<string> | Promise returned with the root directory of the storage.| -- Example +**Example** ```js environment.getStorageDataDir().then(function(path){ @@ -45,13 +45,13 @@ Obtains the root directory of the storage. This API uses an asynchronous callbac **System capability**: SystemCapability.FileManagement.File.Environment -- Parameters +**Parameters** - | Name | Type | Mandatory| Description | - | -------- | --------------------------- | ---- | -------------------------------- | - | callback | AsyncCallback<string> | Yes | Asynchronous callback used to return the root directory of the storage.| +| Name | Type | Mandatory| Description | +| -------- | --------------------------- | ---- | -------------------------------- | +| callback | AsyncCallback<string> | Yes | Asynchronous callback used to return the root directory of the storage.| -- Example +**Example** ```js environment.getStorageDataDir(function(error, path){ @@ -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 -- Return value +**Return value** - | Type | Description | - | --------------------- | ------------------ | - | Promise<string> | Promise returned with the root directory of public files.| +| Type | Description | +| --------------------- | ------------------ | +| Promise<string> | Promise returned with the root directory of public files.| -- Example +**Example** ```js environment.getUserDataDir().then(function(path){ @@ -91,13 +91,13 @@ Obtains the root directory of public files. This API uses an asynchronous callba **System capability**: SystemCapability.FileManagement.File.Environment -- Parameters +**Parameters** - | Name | Type | Mandatory| Description | - | -------- | --------------------------- | ---- | -------------------------------- | - | callback | AsyncCallback<string> | Yes | Asynchronous callback used to return the root directory of public files.| - -- Example +| Name | Type | Mandatory| Description | +| -------- | --------------------------- | ---- | -------------------------------- | +| callback | AsyncCallback<string> | Yes | Asynchronous callback used to return the root directory of public files.| + +**Example** ```js environment.getUserDataDir(function(error, path){