未验证 提交 bf3867b0 编写于 作者: O openharmony_ci 提交者: Gitee

!15289 [翻译完成】#I6E2NB (14466+14566+14621+14818+14828)

Merge pull request !15289 from Annie_wang/PR14466
...@@ -198,18 +198,23 @@ Creates an app account implicitly based on the specified account owner. This API ...@@ -198,18 +198,23 @@ Creates an app account implicitly based on the specified account owner. This API
**Example** **Example**
```js ```js
import featureAbility from '@ohos.ability.featureAbility';
function onResultCallback(code, result) { function onResultCallback(code, result) {
console.log("resultCode: " + code); console.log("resultCode: " + code);
console.log("result: " + JSON.stringify(result)); console.log("result: " + JSON.stringify(result));
} }
function onRequestRedirectedCallback(request) { function onRequestRedirectedCallback(request) {
let abilityStartSetting = {want: request}; let wantInfo = {
featureAbility.startAbility(abilityStartSetting, (err) => { deviceId: '',
bundleName: 'com.example.accountjsdemo',
action: 'ohos.want.action.viewData',
entities: ['entity.system.default'],
}
this.context.startAbility(wantInfo).then(() => {
console.log("startAbility successfully");
}).catch((err) => {
console.log("startAbility err: " + JSON.stringify(err)); console.log("startAbility err: " + JSON.stringify(err));
}); })
} }
try { try {
...@@ -252,18 +257,23 @@ Creates an app account implicitly based on the specified account owner and optio ...@@ -252,18 +257,23 @@ Creates an app account implicitly based on the specified account owner and optio
**Example** **Example**
```js ```js
import featureAbility from '@ohos.ability.featureAbility';
function onResultCallback(code, result) { function onResultCallback(code, result) {
console.log("resultCode: " + code); console.log("resultCode: " + code);
console.log("result: " + JSON.stringify(result)); console.log("result: " + JSON.stringify(result));
} }
function onRequestRedirectedCallback(request) { function onRequestRedirectedCallback(request) {
let abilityStartSetting = {want: request}; let wantInfo = {
featureAbility.startAbility(abilityStartSetting, (err) => { deviceId: '',
bundleName: 'com.example.accountjsdemo',
action: 'ohos.want.action.viewData',
entities: ['entity.system.default'],
}
this.context.startAbility(wantInfo).then(() => {
console.log("startAbility successfully");
}).catch((err) => {
console.log("startAbility err: " + JSON.stringify(err)); console.log("startAbility err: " + JSON.stringify(err));
}); })
} }
let options = { let options = {
...@@ -1090,7 +1100,8 @@ getAllAccounts(callback: AsyncCallback<Array<AppAccountInfo>>): void ...@@ -1090,7 +1100,8 @@ getAllAccounts(callback: AsyncCallback<Array<AppAccountInfo>>): void
Obtains information about all accessible app accounts. This API uses an asynchronous callback to return the result. Obtains information about all accessible app accounts. This API uses an asynchronous callback to return the result.
**Required Permissions**: ohos.permission.GET_ALL_APP_ACCOUNTS **Required permissions**: ohos.permission.GET_ALL_APP_ACCOUNTS
**System capability**: SystemCapability.Account.AppAccount **System capability**: SystemCapability.Account.AppAccount
**Parameters** **Parameters**
...@@ -1127,7 +1138,8 @@ getAllAccounts(): Promise<Array<AppAccountInfo>> ...@@ -1127,7 +1138,8 @@ getAllAccounts(): Promise<Array<AppAccountInfo>>
Obtains information about all accessible app accounts. This API uses a promise to return the result. Obtains information about all accessible app accounts. This API uses a promise to return the result.
**Required Permissions**: ohos.permission.GET_ALL_APP_ACCOUNTS **Required permissions**: ohos.permission.GET_ALL_APP_ACCOUNTS
**System capability**: SystemCapability.Account.AppAccount **System capability**: SystemCapability.Account.AppAccount
**Return value** **Return value**
...@@ -1162,7 +1174,8 @@ getAccountsByOwner(owner: string, callback: AsyncCallback<Array<AppAccount ...@@ -1162,7 +1174,8 @@ getAccountsByOwner(owner: string, callback: AsyncCallback<Array<AppAccount
Obtains the app accounts that can be accessed by the invoker based on the app account owner. This API uses an asynchronous callback to return the result. Obtains the app accounts that can be accessed by the invoker based on the app account owner. This API uses an asynchronous callback to return the result.
**Required Permissions**: ohos.permission.GET_ALL_APP_ACCOUNTS **Required permissions**: ohos.permission.GET_ALL_APP_ACCOUNTS
**System capability**: SystemCapability.Account.AppAccount **System capability**: SystemCapability.Account.AppAccount
**Parameters** **Parameters**
...@@ -1202,7 +1215,8 @@ getAccountsByOwner(owner: string): Promise<Array<AppAccountInfo>> ...@@ -1202,7 +1215,8 @@ getAccountsByOwner(owner: string): Promise<Array<AppAccountInfo>>
Obtains the app accounts that can be accessed by the invoker based on the app account owner. This API uses a promise to return the result. Obtains the app accounts that can be accessed by the invoker based on the app account owner. This API uses a promise to return the result.
**Required Permissions**: ohos.permission.GET_ALL_APP_ACCOUNTS **Required permissions**: ohos.permission.GET_ALL_APP_ACCOUNTS
**System capability**: SystemCapability.Account.AppAccount **System capability**: SystemCapability.Account.AppAccount
**Parameters** **Parameters**
...@@ -1303,7 +1317,7 @@ Unsubscribes from account information changes. ...@@ -1303,7 +1317,7 @@ Unsubscribes from account information changes.
**Example** **Example**
```js ```js
function changeOnCallback(data) { function changeOnCallback(data){
console.log("receive change data:" + JSON.stringify(data)); console.log("receive change data:" + JSON.stringify(data));
} }
try{ try{
...@@ -1350,7 +1364,7 @@ Authenticates an app account. This API uses an asynchronous callback to return t ...@@ -1350,7 +1364,7 @@ Authenticates an app account. This API uses an asynchronous callback to return t
**Example** **Example**
```js ```js
import featureAbility from '@ohos.ability.featureAbility';
function onResultCallback(code, authResult) { function onResultCallback(code, authResult) {
console.log("resultCode: " + code); console.log("resultCode: " + code);
...@@ -1358,10 +1372,17 @@ Authenticates an app account. This API uses an asynchronous callback to return t ...@@ -1358,10 +1372,17 @@ Authenticates an app account. This API uses an asynchronous callback to return t
} }
function onRequestRedirectedCallback(request) { function onRequestRedirectedCallback(request) {
let abilityStartSetting = {want: request}; let wantInfo = {
featureAbility.startAbility(abilityStartSetting, (err) => { deviceId: '',
console.log("startAbility err: " + JSON.stringify(err)); bundleName: 'com.example.accountjsdemo',
}); action: 'ohos.want.action.viewData',
entities: ['entity.system.default'],
}
this.context.startAbility(wantInfo).then(() => {
console.log("startAbility successfully");
}).catch((err) => {
console.log("startAbility err: " + JSON.stringify(err));
})
} }
try { try {
...@@ -1406,7 +1427,7 @@ Authenticates an app account with customized options. This API uses an asynchron ...@@ -1406,7 +1427,7 @@ Authenticates an app account with customized options. This API uses an asynchron
**Example** **Example**
```js ```js
import featureAbility from '@ohos.ability.featureAbility';
function onResultCallback(code, authResult) { function onResultCallback(code, authResult) {
console.log("resultCode: " + code); console.log("resultCode: " + code);
...@@ -1414,10 +1435,17 @@ Authenticates an app account with customized options. This API uses an asynchron ...@@ -1414,10 +1435,17 @@ Authenticates an app account with customized options. This API uses an asynchron
} }
function onRequestRedirectedCallback(request) { function onRequestRedirectedCallback(request) {
let abilityStartSetting = {want: request}; let wantInfo = {
featureAbility.startAbility(abilityStartSetting, (err) => { deviceId: '',
console.log("startAbility err: " + JSON.stringify(err)); bundleName: 'com.example.accountjsdemo',
}); action: 'ohos.want.action.viewData',
entities: ['entity.system.default'],
}
this.context.startAbility(wantInfo).then(() => {
console.log("startAbility successfully");
}).catch((err) => {
console.log("startAbility err: " + JSON.stringify(err));
})
} }
let options = { let options = {
...@@ -2710,7 +2738,7 @@ Adds an app account. This API uses an asynchronous callback to return the result ...@@ -2710,7 +2738,7 @@ Adds an app account. This API uses an asynchronous callback to return the result
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | -------------------- | | -------- | ------------------------- | ---- | -------------------- |
| name | string | Yes | Name of the target app account. | | name | string | Yes | Name of the app account to add. |
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
**Example** **Example**
...@@ -2755,8 +2783,7 @@ addAccount(name: string, extraInfo?: string): Promise<void> ...@@ -2755,8 +2783,7 @@ addAccount(name: string, extraInfo?: string): Promise<void>
Adds an app account name and additional information. This API uses an asynchronous callback to return the result. This API uses a promise to return the result. Adds an app account name and additional information. This API uses an asynchronous callback to return the result. This API uses a promise to return the result.
> **NOTE** > **NOTE**<br>
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [createAccount](#createaccount9-2). > This API is supported since API version 7 and deprecated since API version 9. You are advised to use [createAccount](#createaccount9-2).
**System capability**: SystemCapability.Account.AppAccount **System capability**: SystemCapability.Account.AppAccount
...@@ -2808,7 +2835,7 @@ Adds an app account implicitly based on the specified owner. This API uses an as ...@@ -2808,7 +2835,7 @@ Adds an app account implicitly based on the specified owner. This API uses an as
**Example** **Example**
```js ```js
import featureAbility from '@ohos.ability.featureAbility';
function onResultCallback(code, result) { function onResultCallback(code, result) {
console.log("resultCode: " + code); console.log("resultCode: " + code);
...@@ -2816,10 +2843,17 @@ Adds an app account implicitly based on the specified owner. This API uses an as ...@@ -2816,10 +2843,17 @@ Adds an app account implicitly based on the specified owner. This API uses an as
} }
function onRequestRedirectedCallback(request) { function onRequestRedirectedCallback(request) {
let abilityStartSetting = {want: request}; let wantInfo = {
featureAbility.startAbility(abilityStartSetting, (err)=>{ deviceId: '',
bundleName: 'com.example.accountjsdemo',
action: 'ohos.want.action.viewData',
entities: ['entity.system.default'],
}
this.context.startAbility(wantInfo).then(() => {
console.log("startAbility successfully");
}).catch((err) => {
console.log("startAbility err: " + JSON.stringify(err)); console.log("startAbility err: " + JSON.stringify(err));
}); })
} }
appAccountManager.addAccountImplicitly("com.example.accountjsdemo", "getSocialData", {}, { appAccountManager.addAccountImplicitly("com.example.accountjsdemo", "getSocialData", {}, {
...@@ -2844,7 +2878,7 @@ Deletes an app account. This API uses an asynchronous callback to return the res ...@@ -2844,7 +2878,7 @@ Deletes an app account. This API uses an asynchronous callback to return the res
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | ---------------- | | -------- | ------------------------- | ---- | ---------------- |
| name | string | Yes | Name of the target app account. | | name | string | Yes | Name of the app account to delete. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
**Example** **Example**
...@@ -2871,7 +2905,7 @@ Deletes an app account. This API uses a promise to return the result. ...@@ -2871,7 +2905,7 @@ Deletes an app account. This API uses a promise to return the result.
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ---- | ------ | ---- | ----------- | | ---- | ------ | ---- | ----------- |
| name | string | Yes | Name of the target app account.| | name | string | Yes | Name of the app account to delete.|
**Return value** **Return value**
...@@ -3756,18 +3790,23 @@ Authenticates an app account with customized options. This API uses an asynchron ...@@ -3756,18 +3790,23 @@ Authenticates an app account with customized options. This API uses an asynchron
**Example** **Example**
```js ```js
import featureAbility from '@ohos.ability.featureAbility';
function onResultCallback(code, result) { function onResultCallback(code, result) {
console.log("resultCode: " + code); console.log("resultCode: " + code);
console.log("result: " + JSON.stringify(result)); console.log("result: " + JSON.stringify(result));
} }
function onRequestRedirectedCallback(request) { function onRequestRedirectedCallback(request) {
let abilityStartSetting = {want: request}; let wantInfo = {
featureAbility.startAbility(abilityStartSetting, (err)=>{ deviceId: '',
console.log("startAbility err: " + JSON.stringify(err)); bundleName: 'com.example.accountjsdemo',
}); action: 'ohos.want.action.viewData',
entities: ['entity.system.default'],
}
this.context.startAbility(wantInfo).then(() => {
console.log("startAbility successfully");
}).catch((err) => {
console.log("startAbility err: " + JSON.stringify(err));
})
} }
appAccountManager.authenticate("LiSi", "com.example.accountjsdemo", "getSocialData", {}, { appAccountManager.authenticate("LiSi", "com.example.accountjsdemo", "getSocialData", {}, {
...@@ -4526,10 +4565,13 @@ Enumerates the constants. ...@@ -4526,10 +4565,13 @@ Enumerates the constants.
| KEY_REQUIRED_LABELS<sup>9+</sup> | "requiredLabels" | Required labels. | | KEY_REQUIRED_LABELS<sup>9+</sup> | "requiredLabels" | Required labels. |
| KEY_BOOLEAN_RESULT<sup>9+</sup> | "booleanResult" | Return value of the Boolean type. | | KEY_BOOLEAN_RESULT<sup>9+</sup> | "booleanResult" | Return value of the Boolean type. |
## ResultCode<sup>8+</sup> ## ResultCode<sup>(deprecated)</sup>
Enumerates the result codes. Enumerates the result codes.
> **NOTE**
> This enum is supported since API version 8 and deprecated since API version 9. From API version 9, error codes are used. For details about the error codes, see [App Account Error Codes](../errorcodes/errorcode-account.md).
**System capability**: SystemCapability.Account.AppAccount **System capability**: SystemCapability.Account.AppAccount
| Name | Value | Description | | Name | Value | Description |
...@@ -4765,7 +4807,7 @@ Creates an app account implicitly based on the specified account owner. This API ...@@ -4765,7 +4807,7 @@ Creates an app account implicitly based on the specified account owner. This API
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ---------------- | --------------------- | ---- | --------------- | | ---------------- | --------------------- | ---- | --------------- |
| options | [CreateAccountImplicitlyOptions](#createaccountimplicitlyoptions9) | Yes | Options for implicitly creating the account. | | options | [CreateAccountImplicitlyOptions](#createaccountimplicitlyoptions9) | Yes | Options for implicitly creating an account. |
| callback | [AuthCallback](#authcallback9) | Yes | Authenticator callback invoked to return the result.| | callback | [AuthCallback](#authcallback9) | Yes | Authenticator callback invoked to return the result.|
### addAccountImplicitly<sup>(deprecated)</sup> ### addAccountImplicitly<sup>(deprecated)</sup>
......
...@@ -15,7 +15,7 @@ import fs from '@ohos.file.fs'; ...@@ -15,7 +15,7 @@ import fs from '@ohos.file.fs';
## Guidelines ## Guidelines
Before using the APIs provided by this module to perform operations on files or directories, obtain the path of the application sandbox as follows: Before using the APIs provided by this module to perform operations on files or directories, obtain the path of the file or directory in the application sandbox as follows:
**Stage Model** **Stage Model**
...@@ -147,7 +147,7 @@ Checks whether a file exists. This API uses a promise to return the result. ...@@ -147,7 +147,7 @@ Checks whether a file exists. This API uses a promise to return the result.
| Type | Description | | Type | Description |
| ------------------- | ---------------------------- | | ------------------- | ---------------------------- |
| Promise&lt;boolean&gt; | Promise used to return a Boolean value. | | Promise&lt;boolean&gt; | Promise used to return a Boolean value.|
**Example** **Example**
...@@ -1079,7 +1079,7 @@ Reads the text content of a file. This API uses an asynchronous callback to retu ...@@ -1079,7 +1079,7 @@ Reads the text content of a file. This API uses an asynchronous callback to retu
| -------- | --------------------------- | ---- | ------------------------------------------------------------ | | -------- | --------------------------- | ---- | ------------------------------------------------------------ |
| filePath | string | Yes | Path of the file in the application sandbox. | | filePath | string | Yes | Path of the file in the application sandbox. |
| options | Object | No | The options are as follows:<br>- **offset** (number): position of the data to read in the file. This parameter is optional. By default, data is read from the current position.<br>- **length** (number): length of the data to read. This parameter is optional. The default value is the file length.<br>- **encoding** (string): format of the string to be encoded. The default value is **'utf-8'**, which is the only value supported.| | options | Object | No | The options are as follows:<br>- **offset** (number): position of the data to read in the file. This parameter is optional. By default, data is read from the current position.<br>- **length** (number): length of the data to read. This parameter is optional. The default value is the file length.<br>- **encoding** (string): format of the string to be encoded. The default value is **'utf-8'**, which is the only value supported.|
| callback | AsyncCallback&lt;string&gt; | Yes | Callback used to return the content read. | | callback | AsyncCallback&lt;string&gt; | Yes | Callback invoked to return the content read. |
**Example** **Example**
...@@ -1169,7 +1169,7 @@ Obtains information about a symbolic link. This API uses an asynchronous callbac ...@@ -1169,7 +1169,7 @@ Obtains information about a symbolic link. This API uses an asynchronous callbac
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ---------------------------------- | ---- | -------------------------------------- | | -------- | ---------------------------------- | ---- | -------------------------------------- |
| path | string | Yes | Path of the symbolic link in the application sandbox.| | path | string | Yes | Path of the symbolic link in the application sandbox.|
| callback | AsyncCallback&lt;[Stat](#stat)&gt; | Yes | Callback used to return the symbolic link information obtained. | | callback | AsyncCallback&lt;[Stat](#stat)&gt; | Yes | Callback invoked to return the symbolic link information obtained. |
**Example** **Example**
...@@ -1215,7 +1215,7 @@ Obtains information about a symbolic link synchronously. ...@@ -1215,7 +1215,7 @@ Obtains information about a symbolic link synchronously.
rename(oldPath: string, newPath: string): Promise&lt;void&gt; rename(oldPath: string, newPath: string): Promise&lt;void&gt;
Renames a file. This API uses a promise to return the result. Renames a file or directory. This API uses a promise to return the result.
**System capability**: SystemCapability.FileManagement.File.FileIO **System capability**: SystemCapability.FileManagement.File.FileIO
...@@ -1248,7 +1248,7 @@ Renames a file. This API uses a promise to return the result. ...@@ -1248,7 +1248,7 @@ Renames a file. This API uses a promise to return the result.
rename(oldPath: string, newPath: string, callback: AsyncCallback&lt;void&gt;): void rename(oldPath: string, newPath: string, callback: AsyncCallback&lt;void&gt;): void
Renames a file. This API uses an asynchronous callback to return the result. Renames a file or directory. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.FileManagement.File.FileIO **System capability**: SystemCapability.FileManagement.File.FileIO
...@@ -1278,7 +1278,7 @@ Renames a file. This API uses an asynchronous callback to return the result. ...@@ -1278,7 +1278,7 @@ Renames a file. This API uses an asynchronous callback to return the result.
renameSync(oldPath: string, newPath: string): void renameSync(oldPath: string, newPath: string): void
Synchronously renames a file. Renames a file or directory synchronously.
**System capability**: SystemCapability.FileManagement.File.FileIO **System capability**: SystemCapability.FileManagement.File.FileIO
...@@ -1366,7 +1366,7 @@ Flushes data of a file to disk. This API uses an asynchronous callback to return ...@@ -1366,7 +1366,7 @@ Flushes data of a file to disk. This API uses an asynchronous callback to return
fsyncSync(fd: number): void fsyncSync(fd: number): void
Flushes data of a file to disk in synchronous mode. Flushes data of a file to disk synchronously.
**System capability**: SystemCapability.FileManagement.File.FileIO **System capability**: SystemCapability.FileManagement.File.FileIO
...@@ -1454,7 +1454,7 @@ Flushes data of a file to disk. This API uses an asynchronous callback to return ...@@ -1454,7 +1454,7 @@ Flushes data of a file to disk. This API uses an asynchronous callback to return
fdatasyncSync(fd: number): void fdatasyncSync(fd: number): void
Synchronizes data in a file in synchronous mode. Synchronizes data in a file synchronously.
**System capability**: SystemCapability.FileManagement.File.FileIO **System capability**: SystemCapability.FileManagement.File.FileIO
......
...@@ -36,14 +36,14 @@ Obtains the number of free bytes of the specified file system in asynchronous mo ...@@ -36,14 +36,14 @@ Obtains the number of free bytes of the specified file system in asynchronous mo
```js ```js
let path = "/dev"; let path = "/dev";
statfs.getFreeSize(path).then((number) => { statvfs.getFreeSize(path).then((number) => {
console.info("getFreeSize promise successfully, Size: " + number); console.info("getFreeSize promise successfully, Size: " + number);
}).catch((err) => { }).catch((err) => {
console.info("getFreeSize failed with error message: " + err.message + ", error code: " + err.code); console.info("getFreeSize failed with error message: " + err.message + ", error code: " + err.code);
}); });
``` ```
## statfs.getFreeSize ## statvfs.getFreeSize
getFreeSize(path:string, callback:AsyncCallback&lt;number&gt;): void getFreeSize(path:string, callback:AsyncCallback&lt;number&gt;): void
...@@ -62,7 +62,7 @@ Obtains the number of free bytes of the specified file system in asynchronous mo ...@@ -62,7 +62,7 @@ Obtains the number of free bytes of the specified file system in asynchronous mo
```js ```js
let path = "/dev"; let path = "/dev";
statfs.getFreeSize(path, (err, number) => { statvfs.getFreeSize(path, (err, number) => {
if (err) { if (err) {
console.info("getFreeSize failed with error message: " + err.message + ", error code: " + err.code); console.info("getFreeSize failed with error message: " + err.message + ", error code: " + err.code);
} else { } else {
...@@ -71,7 +71,7 @@ Obtains the number of free bytes of the specified file system in asynchronous mo ...@@ -71,7 +71,7 @@ Obtains the number of free bytes of the specified file system in asynchronous mo
}); });
``` ```
## statfs.getTotalSize ## statvfs.getTotalSize
getTotalSize(path: string): Promise&lt;number&gt; getTotalSize(path: string): Promise&lt;number&gt;
...@@ -95,14 +95,14 @@ Obtains the total number of bytes of the specified file system in asynchronous m ...@@ -95,14 +95,14 @@ Obtains the total number of bytes of the specified file system in asynchronous m
```js ```js
let path = "/dev"; let path = "/dev";
statfs.getTotalSize(path).then((number) => { statvfs.getTotalSize(path).then((number) => {
console.info("getTotalSize promise successfully, Size: " + number); console.info("getTotalSize promise successfully, Size: " + number);
}).catch((err) => { }).catch((err) => {
console.info("getTotalSize with error message: " + err.message + ", error code: " + err.code); console.info("getTotalSize with error message: " + err.message + ", error code: " + err.code);
}); });
``` ```
## statfs.getTotalSize ## statvfs.getTotalSize
getTotalSize(path: string, callback: AsyncCallback&lt;number&gt;): void getTotalSize(path: string, callback: AsyncCallback&lt;number&gt;): void
...@@ -121,7 +121,7 @@ Obtains the total number of bytes of the specified file system in asynchronous m ...@@ -121,7 +121,7 @@ Obtains the total number of bytes of the specified file system in asynchronous m
```js ```js
let path = "/dev"; let path = "/dev";
statfs.getTotalSize(path, (err, number) => { statvfs.getTotalSize(path, (err, number) => {
if (err) { if (err) {
console.info("getTotalSize with error message: " + err.message + ", error code: " + err.code); console.info("getTotalSize with error message: " + err.message + ", error code: " + err.code);
} else { } else {
......
...@@ -17,7 +17,7 @@ import fileAccess from '@ohos.file.fileAccess'; ...@@ -17,7 +17,7 @@ import fileAccess from '@ohos.file.fileAccess';
getFileAccessAbilityInfo( ) : Promise&lt;Array&lt;Want&gt;&gt; getFileAccessAbilityInfo( ) : Promise&lt;Array&lt;Want&gt;&gt;
Obtains information about all wants with **extension** set to **fileAcesss** in the system. A want is a basic communication component used to start services. This API uses a promise to return the result. Obtains information about all wants with **extension** set to **fileAccess** in the system. A want is a basic communication component used to start services. This API uses a promise to return the result.
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -47,7 +47,7 @@ Obtains information about all wants with **extension** set to **fileAcesss** in ...@@ -47,7 +47,7 @@ Obtains information about all wants with **extension** set to **fileAcesss** in
getFileAccessAbilityInfo(callback: AsyncCallback&lt;Array&lt;Want&gt;&gt;): void; getFileAccessAbilityInfo(callback: AsyncCallback&lt;Array&lt;Want&gt;&gt;): void;
Obtains information about all wants with **extension** set to **fileAcesss** in the system. A want is a basic communication component used to start services. This API uses an asynchronous callback to return the result. Obtains information about all wants with **extension** set to **fileAccess** in the system. A want is a basic communication component used to start services. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -114,7 +114,7 @@ Synchronously creates a **Helper** object to connect to the specified wants. The ...@@ -114,7 +114,7 @@ Synchronously creates a **Helper** object to connect to the specified wants. The
}, },
] ]
try { try {
// this.context is passed by MainAbility. // this.context is passed by EntryAbility.
fileAccessHelper = fileAccess.createFileAccessHelper(this.context, wantInfos); fileAccessHelper = fileAccess.createFileAccessHelper(this.context, wantInfos);
if (!fileAccessHelper) if (!fileAccessHelper)
console.error("createFileAccessHelper interface returns an undefined object"); console.error("createFileAccessHelper interface returns an undefined object");
...@@ -150,12 +150,12 @@ Synchronously creates a **Helper** object to connect to all file management serv ...@@ -150,12 +150,12 @@ Synchronously creates a **Helper** object to connect to all file management serv
```js ```js
createFileAccessHelper() { createFileAccessHelper() {
let fileAccesssHelperAllServer = null; let fileAccessHelperAllServer = null;
// Create a Helper object to interact with all file management services configured with fileAccess in the system. // Create a Helper object to interact with all file management services configured with fileAccess in the system.
try { try {
// this.context is passed by MainAbility. // this.context is passed by EntryAbility.
fileAccesssHelperAllServer = fileAccess.createFileAccessHelper(this.context); fileAccessHelperAllServer = fileAccess.createFileAccessHelper(this.context);
if (!fileAccesssHelperAllServer) if (!fileAccessHelperAllServer)
console.error("createFileAccessHelper interface returns an undefined object"); console.error("createFileAccessHelper interface returns an undefined object");
} catch (error) { } catch (error) {
console.error("createFileAccessHelper failed, errCode:" + error.code + ", errMessage:" + error.message); console.error("createFileAccessHelper failed, errCode:" + error.code + ", errMessage:" + error.message);
...@@ -167,8 +167,7 @@ Synchronously creates a **Helper** object to connect to all file management serv ...@@ -167,8 +167,7 @@ Synchronously creates a **Helper** object to connect to all file management serv
getRoots( ) : Promise&lt;RootIterator&gt; getRoots( ) : Promise&lt;RootIterator&gt;
Obtains information about the device root nodes of the file management service type connected to the **Helper** object. This API uses a promise to return a **RootIterator** object, which Obtains information about the device root nodes of the file management service type connected to the **Helper** object. This API uses a promise to return a **RootIterator** object, which returns [RootInfo](#rootinfo) by using [next()](#rootiteratornext).
returns [RootInfo](#rootinfo) by using [next()](#rootiteratornext).
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -212,6 +211,7 @@ returns [RootInfo](#rootinfo) by using [next()](#rootiteratornext). ...@@ -212,6 +211,7 @@ returns [RootInfo](#rootinfo) by using [next()](#rootiteratornext).
getRoots(callback:AsyncCallback&lt;RootIterator&gt;) : void; getRoots(callback:AsyncCallback&lt;RootIterator&gt;) : void;
Obtains information about the device root nodes of the file management service type connected to the **Helper** object. This API uses an asynchronous callback to return the result. Obtains information about the device root nodes of the file management service type connected to the **Helper** object. This API uses an asynchronous callback to return the result.
The callback has a **RootIterator** object, which returns [RootInfo](#rootinfo) through [next()](#rootiteratornext). The callback has a **RootIterator** object, which returns [RootInfo](#rootinfo) through [next()](#rootiteratornext).
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -255,7 +255,7 @@ The callback has a **RootIterator** object, which returns [RootInfo](#rootinfo) ...@@ -255,7 +255,7 @@ The callback has a **RootIterator** object, which returns [RootInfo](#rootinfo)
listFile(filter?: Filter) : FileIterator listFile(filter?: Filter) : FileIterator
Synchronously obtains the **FileIterator** object of the first-level files (file folder) matching the conditions of the filter from the device root node. The **FileIterator** object then returns [FileInfo](#fileinfo) by using [next()](#fileiteratornext). Synchronously obtains the **FileIterator** object of the first-level files (directory) matching the conditions of the filter from the device root node. The **FileIterator** object then returns [FileInfo](#fileinfo) by using [next()](#fileiteratornext).
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -356,7 +356,7 @@ Recursively obtains the **FileIterator** object of the files matching the condit ...@@ -356,7 +356,7 @@ Recursively obtains the **FileIterator** object of the files matching the condit
listFile(filter?: Filter) : FileIterator listFile(filter?: Filter) : FileIterator
Synchronously obtains the **FileIterator** object of the next-level files (file folders) matching the conditions of the filter from a directory. The **FileIterator** object then returns [FileInfo](#fileinfo) by using [next()](#fileiteratornext). Synchronously obtains the **FileIterator** object of the next-level files (directories) matching the conditions of the filter from a directory. The **FileIterator** object then returns [FileInfo](#fileinfo) by using [next()](#fileiteratornext).
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -542,7 +542,7 @@ Creates a file in a directory. This API uses an asynchronous callback to return ...@@ -542,7 +542,7 @@ Creates a file in a directory. This API uses an asynchronous callback to return
mkDir(parentUri: string, displayName: string) : Promise&lt;string&gt; mkDir(parentUri: string, displayName: string) : Promise&lt;string&gt;
Creates a folder in a directory. This API uses a promise to return the result. Creates a directory. This API uses a promise to return the result.
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -552,14 +552,14 @@ Creates a folder in a directory. This API uses a promise to return the result. ...@@ -552,14 +552,14 @@ Creates a folder in a directory. This API uses a promise to return the result.
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| parentUri | string | Yes| URI of the parent directory for the folder to create.| | parentUri | string | Yes| URI of the parent directory for the directory to create.|
| displayName | string | Yes| Name of the folder to create.| | displayName | string | Yes| Name of the directory to create.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| --- | -- | | --- | -- |
| Promise&lt;string&gt; | Promise used to return the URI of the folder created.| | Promise&lt;string&gt; | Promise used to return the URI of the directory created.|
**Example** **Example**
...@@ -587,7 +587,7 @@ Creates a folder in a directory. This API uses a promise to return the result. ...@@ -587,7 +587,7 @@ Creates a folder in a directory. This API uses a promise to return the result.
mkDir(parentUri: string, displayName: string, callback: AsyncCallback&lt;string&gt;) : void; mkDir(parentUri: string, displayName: string, callback: AsyncCallback&lt;string&gt;) : void;
Creates a folder in a directory. This API uses an asynchronous callback to return the result. Creates a directory. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -597,9 +597,9 @@ Creates a folder in a directory. This API uses an asynchronous callback to retur ...@@ -597,9 +597,9 @@ Creates a folder in a directory. This API uses an asynchronous callback to retur
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| parentUri | string | Yes| URI of the parent directory for the folder to create.| | parentUri | string | Yes| URI of the parent directory for the directory to create.|
| displayName | string | Yes| Name of the folder to create.| | displayName | string | Yes| Name of the directory to create.|
| callback | AsyncCallback&lt;string&gt; | Yes| Promise used to return the URI of the folder created.| | callback | AsyncCallback&lt;string&gt; | Yes| Promise used to return the URI of the directory created.|
**Example** **Example**
...@@ -677,7 +677,7 @@ Opens a file. This API uses an asynchronous callback to return the result. ...@@ -677,7 +677,7 @@ Opens a file. This API uses an asynchronous callback to return the result.
| --- | --- | --- | -- | | --- | --- | --- | -- |
| uri | string | Yes| URI of the file to open.| | uri | string | Yes| URI of the file to open.|
| flags | [OPENFLAGS](#openflags) | Yes| File open mode.| | flags | [OPENFLAGS](#openflags) | Yes| File open mode.|
| callback | AsyncCallback&lt;number&gt; | Yes| Promise used to return the file descriptor of the file opened.| | callback | AsyncCallback&lt;number&gt; | Yes| Callback invoked to return the file descriptor of the file opened.|
**Example** **Example**
...@@ -704,7 +704,7 @@ Opens a file. This API uses an asynchronous callback to return the result. ...@@ -704,7 +704,7 @@ Opens a file. This API uses an asynchronous callback to return the result.
delete(uri: string) : Promise&lt;number&gt; delete(uri: string) : Promise&lt;number&gt;
Deletes a file or folder. This API uses a promise to return the result. Deletes a file or directory. This API uses a promise to return the result.
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -714,7 +714,7 @@ Deletes a file or folder. This API uses a promise to return the result. ...@@ -714,7 +714,7 @@ Deletes a file or folder. This API uses a promise to return the result.
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| uri | string | Yes| URI of the file or folder to delete.| | uri | string | Yes| URI of the file or directory to delete.|
**Return value** **Return value**
...@@ -743,7 +743,7 @@ Deletes a file or folder. This API uses a promise to return the result. ...@@ -743,7 +743,7 @@ Deletes a file or folder. This API uses a promise to return the result.
delete(uri: string, callback: AsyncCallback&lt;number&gt;) : void; delete(uri: string, callback: AsyncCallback&lt;number&gt;) : void;
Deletes a file or folder. This API uses an asynchronous callback to return the result. Deletes a file or directory. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -753,7 +753,7 @@ Deletes a file or folder. This API uses an asynchronous callback to return the r ...@@ -753,7 +753,7 @@ Deletes a file or folder. This API uses an asynchronous callback to return the r
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| uri | string | Yes| URI of the file or folder to delete.| | uri | string | Yes| URI of the file or directory to delete.|
| callback | AsyncCallback&lt;number&gt; | Yes| Promise used to return the result.| | callback | AsyncCallback&lt;number&gt; | Yes| Promise used to return the result.|
**Example** **Example**
...@@ -781,7 +781,7 @@ Deletes a file or folder. This API uses an asynchronous callback to return the r ...@@ -781,7 +781,7 @@ Deletes a file or folder. This API uses an asynchronous callback to return the r
move(sourceFile: string, destFile: string) : Promise&lt;string&gt; move(sourceFile: string, destFile: string) : Promise&lt;string&gt;
Moves a file or folder. This API uses a promise to return the result. Moves a file or directory. This API uses a promise to return the result.
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -791,20 +791,20 @@ Moves a file or folder. This API uses a promise to return the result. ...@@ -791,20 +791,20 @@ Moves a file or folder. This API uses a promise to return the result.
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| sourceFile | string | Yes| URI of the file or folder to move.| | sourceFile | string | Yes| URI of the file or directory to move.|
| destFile | string | Yes| URI of the folder to which the file or folder will be moved.| | destFile | string | Yes| URI of the directory, to which the file or directory will be moved.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| ----- | ------ | | ----- | ------ |
| Promise&lt;string&gt; | Promise used to return the URI of the file or folder in the destination directory.| | Promise&lt;string&gt; | Promise used to return the URI of the file or directory in the destination directory.|
**Example** **Example**
```js ```js
// The media library URI is used as an example. // The media library URI is used as an example.
//In the sample code, sourceFile destFile indicates the file or folder in the Download directory. The URI is the URI in fileInfo. //In the sample code, sourceFile destFile indicates the file or directory in the Download directory. The URI is the URI in fileInfo.
// You can use the URI obtained. // You can use the URI obtained.
let sourceFile = "datashare:///media/file/102"; let sourceFile = "datashare:///media/file/102";
let destFile = "datashare:///media/file/101"; let destFile = "datashare:///media/file/101";
...@@ -821,7 +821,7 @@ Moves a file or folder. This API uses a promise to return the result. ...@@ -821,7 +821,7 @@ Moves a file or folder. This API uses a promise to return the result.
move(sourceFile: string, destFile: string, callback: AsyncCallback&lt;string&gt;) : void; move(sourceFile: string, destFile: string, callback: AsyncCallback&lt;string&gt;) : void;
Moves a file or folder. This API uses an asynchronous callback to return the result. Moves a file or directory. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -831,15 +831,15 @@ Moves a file or folder. This API uses an asynchronous callback to return the res ...@@ -831,15 +831,15 @@ Moves a file or folder. This API uses an asynchronous callback to return the res
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| sourceFile | string | Yes| URI of the file or folder to move.| | sourceFile | string | Yes| URI of the file or directory to move.|
| destFile | string | Yes| URI of the folder to which the file or folder will be moved.| | destFile | string | Yes| URI of the directory, to which the file or directory will be moved.|
| callback | AsyncCallback&lt;string&gt; | Yes| Promise used to return the URI of the file or folder in the destination directory.| | callback | AsyncCallback&lt;string&gt; | Yes| Promise used to return the URI of the file or directory in the destination directory.|
**Example** **Example**
```js ```js
// The media library URI is used as an example. // The media library URI is used as an example.
//In the sample code, sourceFile destFile indicates the file or folder in the Download directory. The URI is the URI in fileInfo. //In the sample code, sourceFile destFile indicates the file or directory in the Download directory. The URI is the URI in fileInfo.
// You can use the URI obtained. // You can use the URI obtained.
let sourceFile = "datashare:///media/file/102"; let sourceFile = "datashare:///media/file/102";
let destFile = "datashare:///media/file/101"; let destFile = "datashare:///media/file/101";
...@@ -861,7 +861,7 @@ Moves a file or folder. This API uses an asynchronous callback to return the res ...@@ -861,7 +861,7 @@ Moves a file or folder. This API uses an asynchronous callback to return the res
rename(uri: string, displayName: string) : Promise&lt;string&gt; rename(uri: string, displayName: string) : Promise&lt;string&gt;
Renames a file or folder. This API uses a promise to return the result. Renames a file or directory. This API uses a promise to return the result.
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -871,14 +871,14 @@ Renames a file or folder. This API uses a promise to return the result. ...@@ -871,14 +871,14 @@ Renames a file or folder. This API uses a promise to return the result.
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| uri | string | Yes| URI of the file or folder to rename.| | uri | string | Yes| URI of the file or directory to rename.|
| displayName | string | Yes| New name of the file or folder, which can contain the file name extension.| | displayName | string | Yes| New name of the file or directory, which can contain the file name extension.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| --- | -- | | --- | -- |
| Promise&lt;string&gt; | Promise used to return the URI of the renamed file or folder.| | Promise&lt;string&gt; | Promise used to return the URI of the renamed file or directory.|
**Example** **Example**
...@@ -900,7 +900,7 @@ Renames a file or folder. This API uses a promise to return the result. ...@@ -900,7 +900,7 @@ Renames a file or folder. This API uses a promise to return the result.
rename(uri: string, displayName: string, callback: AsyncCallback&lt;string&gt;) : void; rename(uri: string, displayName: string, callback: AsyncCallback&lt;string&gt;) : void;
Renames a file or folder. This API uses an asynchronous callback to return the result. Renames a file or directory. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -910,9 +910,9 @@ Renames a file or folder. This API uses an asynchronous callback to return the r ...@@ -910,9 +910,9 @@ Renames a file or folder. This API uses an asynchronous callback to return the r
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| uri | string | Yes| URI of the file or folder to rename.| | uri | string | Yes| URI of the file or directory to rename.|
| displayName | string | Yes| New name of the file or folder, which can contain the file name extension.| | displayName | string | Yes| New name of the file or directory, which can contain the file name extension.|
| callback | AsyncCallback&lt;string&gt; | Yes| Promise used to return the URI of the renamed file or folder.| | callback | AsyncCallback&lt;string&gt; | Yes| Promise used to return the URI of the renamed file or directory.|
**Example** **Example**
...@@ -939,7 +939,7 @@ Renames a file or folder. This API uses an asynchronous callback to return the r ...@@ -939,7 +939,7 @@ Renames a file or folder. This API uses an asynchronous callback to return the r
access(sourceFileUri: string) : Promise&lt;boolean&gt; access(sourceFileUri: string) : Promise&lt;boolean&gt;
Checks whether a file or folder exists. This API uses a promise to return the result. Checks whether a file or directory exists. This API uses a promise to return the result.
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -949,7 +949,7 @@ Checks whether a file or folder exists. This API uses a promise to return the re ...@@ -949,7 +949,7 @@ Checks whether a file or folder exists. This API uses a promise to return the re
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| sourceFileUri | string | Yes| URI of the file or folder.| | sourceFileUri | string | Yes| URI of the file or directory.|
**Return value** **Return value**
...@@ -980,7 +980,7 @@ Checks whether a file or folder exists. This API uses a promise to return the re ...@@ -980,7 +980,7 @@ Checks whether a file or folder exists. This API uses a promise to return the re
access(sourceFileUri: string, callback: AsyncCallback&lt;boolean&gt;) : void; access(sourceFileUri: string, callback: AsyncCallback&lt;boolean&gt;) : void;
Checks whether a file or folder exists. This API uses an asynchronous callback to return the result. Checks whether a file or directory exists. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -990,7 +990,7 @@ Checks whether a file or folder exists. This API uses an asynchronous callback t ...@@ -990,7 +990,7 @@ Checks whether a file or folder exists. This API uses an asynchronous callback t
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| sourceFileUri | string | Yes| URI of the file or folder.| | sourceFileUri | string | Yes| URI of the file or directory.|
| callback | AsyncCallback&lt;boolean&gt; | Yes| Promise used to return the result.| | callback | AsyncCallback&lt;boolean&gt; | Yes| Promise used to return the result.|
**Example** **Example**
...@@ -1031,13 +1031,13 @@ Obtains the next-level device root directory. **RootIterator** is an iterator ob ...@@ -1031,13 +1031,13 @@ Obtains the next-level device root directory. **RootIterator** is an iterator ob
| Type| Description| | Type| Description|
| --- | -- | | --- | -- |
| {value: RootInfo, done: boolean} | Root directory information obtained. This API traverses the folder until **done** returns **true**. The **value** field contains the root directory information.| | {value: RootInfo, done: boolean} | Root directory information obtained. This API traverses the directory until **done** returns **true**. The **value** field contains the root directory information.|
## FileIterator.next ## FileIterator.next
next( ) : { value: FileInfo, done: boolean } next( ) : { value: FileInfo, done: boolean }
Obtains the information about the next-level file or folder. **FileIterator** is an iterator object of a folder. Obtains the information about the next-level file or directory. **FileIterator** is an iterator object of a directory.
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -1047,7 +1047,7 @@ Obtains the information about the next-level file or folder. **FileIterator** is ...@@ -1047,7 +1047,7 @@ Obtains the information about the next-level file or folder. **FileIterator** is
| Type| Description| | Type| Description|
| --- | -- | | --- | -- |
| {value: FileInfo, done: boolean} | File or folder information obtained. This API traverses the specified folder until **done** returns **true**. The **value** field contains the file or folder information obtained.| | {value: FileInfo, done: boolean} | File or directory information obtained. This API traverses the specified directory until **done** returns **true**. The **value** field contains the file or directory information obtained.|
## RootInfo ## RootInfo
...@@ -1068,7 +1068,7 @@ Represents the root attribute information and interface capabilities of a device ...@@ -1068,7 +1068,7 @@ Represents the root attribute information and interface capabilities of a device
## FileInfo ## FileInfo
Represents the file or folder attribute information and interface capabilities. Represents the file or directory attribute information and interface capabilities.
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -1078,12 +1078,12 @@ Represents the file or folder attribute information and interface capabilities. ...@@ -1078,12 +1078,12 @@ Represents the file or folder attribute information and interface capabilities.
| Name| Type | Readable| Writable| Description | | Name| Type | Readable| Writable| Description |
| ------ | ------ | -------- | ------ | -------- | | ------ | ------ | -------- | ------ | -------- |
| uri | string | Yes| No| URI of the file or folder.| | uri | string | Yes| No| URI of the file or directory.|
| fileName | string | Yes| No| Name of a file or folder.| | fileName | string | Yes| No| Name of a file or directory.|
| mode | number | Yes| No| Permissions on the file or folder.| | mode | number | Yes| No| Permissions on the file or directory.|
| size | number | Yes| No| Size of the file or folder.| | size | number | Yes| No| Size of the file or directory.|
| mtime | number | Yes| No| Time when the file or folder was last modified.| | mtime | number | Yes| No| Time when the file or directory was last modified.|
| mimeType | string | Yes| No| MIME type of the file or folder.| | mimeType | string | Yes| No| MIME type of the file or directory.|
## OPENFLAGS ## OPENFLAGS
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册