From ac6e0d6f62ec6b81a60e95e7bac192fc68b5a003 Mon Sep 17 00:00:00 2001 From: onexiaomin Date: Thu, 22 Sep 2022 16:44:01 +0800 Subject: [PATCH 1/3] fix no define Filter and mimetype Signed-off-by: onexiaomin --- api/@ohos.data.fileAccess.d.ts | 9 +++++---- api/@ohos.fileExtensionInfo.d.ts | 12 ++++++------ api/@ohos.fileio.d.ts | 4 ++-- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/api/@ohos.data.fileAccess.d.ts b/api/@ohos.data.fileAccess.d.ts index a5d191c8ce..46b8b6c591 100644 --- a/api/@ohos.data.fileAccess.d.ts +++ b/api/@ohos.data.fileAccess.d.ts @@ -14,9 +14,9 @@ */ import { AsyncCallback, Callback } from "./basic"; -import { Want } from './ability/want'; +import Want from './@ohos.application.Want'; import Context from './application/Context'; -import Filter from '@ohos.fileio' +import { Filter } from './@ohos.fileio'; /** * This module provides the capability to access user public files. @@ -74,7 +74,7 @@ declare namespace fileAccess { * @param mode Indicates the mode of the file. * @param size Indicates the size of the file. * @param mtime Indicates the mtime of the file. - * @param mimetype Indicates the mimetype of the file. + * @param mimeType Indicates the mimeType of the file. */ interface FileInfo { /** @@ -106,7 +106,7 @@ declare namespace fileAccess { * @type {string} * @readonly */ - mimetype: string; + mimeType: string; /** * List files in the current directory. @@ -217,6 +217,7 @@ declare namespace fileAccess { * @since 9 * @syscap SystemCapability.FileManagement.UserFileService * @StageModelOnly + * @systemapi */ enum OPENFLAGS { /** file is openFile only_read */ diff --git a/api/@ohos.fileExtensionInfo.d.ts b/api/@ohos.fileExtensionInfo.d.ts index d016f74bc5..4d7685ac10 100644 --- a/api/@ohos.fileExtensionInfo.d.ts +++ b/api/@ohos.fileExtensionInfo.d.ts @@ -46,8 +46,8 @@ declare namespace fileExtensionInfo { * @StageModelOnly */ namespace DeviceFlag { - const SUPPORTS_READ = 1; - const SUPPORTS_WRITE = 1 << 1; + const SUPPORTS_READ = 0b1; + const SUPPORTS_WRITE = 0b10; } /** @@ -58,10 +58,10 @@ declare namespace fileExtensionInfo { * @StageModelOnly */ namespace DocumentFlag { - const REPRESENTS_FILE = 1; - const REPRESENTS_DIR = 1 << 1; - const SUPPORTS_READ = 1 << 2; - const SUPPORTS_WRITE = 1 << 3; + const REPRESENTS_FILE = 0b1; + const REPRESENTS_DIR = 0b10; + const SUPPORTS_READ = 0b100; + const SUPPORTS_WRITE = 0b1000; } } diff --git a/api/@ohos.fileio.d.ts b/api/@ohos.fileio.d.ts index e13dae4b53..40ce3da342 100644 --- a/api/@ohos.fileio.d.ts +++ b/api/@ohos.fileio.d.ts @@ -84,7 +84,7 @@ declare namespace fileIO { export { writeSync }; export { Dir }; export { Dirent }; - export { Filter }; + export { ReadOut }; export { Stat }; export { Stream }; @@ -1156,7 +1156,7 @@ declare interface Dirent { isSymbolicLink(): boolean; } -declare interface Filter { +export type Filter = { /** * @type {Array} * @syscap SystemCapability.FileManagement.File.FileIO -- Gitee From e2f00b73d49752b2868824911f833f01ef63a744 Mon Sep 17 00:00:00 2001 From: onexiaomin Date: Thu, 22 Sep 2022 17:27:31 +0800 Subject: [PATCH 2/3] fix no define Filter and mimetype Signed-off-by: onexiaomin --- api/@ohos.fileio.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/api/@ohos.fileio.d.ts b/api/@ohos.fileio.d.ts index 40ce3da342..4b4cf3f664 100644 --- a/api/@ohos.fileio.d.ts +++ b/api/@ohos.fileio.d.ts @@ -84,7 +84,6 @@ declare namespace fileIO { export { writeSync }; export { Dir }; export { Dirent }; - export { ReadOut }; export { Stat }; export { Stream }; -- Gitee From a1852af9be97385d216bab0971ee9659edbe2c99 Mon Sep 17 00:00:00 2001 From: onexiaomin Date: Thu, 22 Sep 2022 18:23:53 +0800 Subject: [PATCH 3/3] fix no define Filter and mimetype Signed-off-by: onexiaomin --- api/@ohos.data.fileAccess.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.data.fileAccess.d.ts b/api/@ohos.data.fileAccess.d.ts index 46b8b6c591..8c97e5212b 100644 --- a/api/@ohos.data.fileAccess.d.ts +++ b/api/@ohos.data.fileAccess.d.ts @@ -14,7 +14,7 @@ */ import { AsyncCallback, Callback } from "./basic"; -import Want from './@ohos.application.Want'; +import Want from './@ohos.application.Want'; import Context from './application/Context'; import { Filter } from './@ohos.fileio'; -- Gitee