From b850311497df80ae1752d11b2b084ac54f844f0d Mon Sep 17 00:00:00 2001 From: haonan_7 Date: Fri, 11 Mar 2022 14:54:46 +0800 Subject: [PATCH] add @systemapi Signed-off-by: haonan_7 --- api/@ohos.environment.d.ts | 3 +++ api/@ohos.fileManager.d.ts | 5 +++++ api/@ohos.storageStatistics.d.ts | 4 ++++ api/@ohos.volumeManager.d.ts | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/api/@ohos.environment.d.ts b/api/@ohos.environment.d.ts index 0d29e0241b..b6d84144b3 100644 --- a/api/@ohos.environment.d.ts +++ b/api/@ohos.environment.d.ts @@ -20,12 +20,14 @@ import {AsyncCallback, Callback} from "./basic"; * * @since 8 * @syscap SystemCapability.FileManagement.File.Environment + * @systemapi */ declare namespace Environment { /** * Get the user data path. * * @since 8 + * @systemapi */ function getStorageDataDir(callback: AsyncCallback): void; function getStorageDataDir(): Promise; @@ -33,6 +35,7 @@ declare namespace Environment { * Get the User storage path. * * @since 8 + * @systemapi */ function getUserDataDir(callback: AsyncCallback): void; function getUserDataDir(): Promise; diff --git a/api/@ohos.fileManager.d.ts b/api/@ohos.fileManager.d.ts index 5486431568..0b51f1f006 100644 --- a/api/@ohos.fileManager.d.ts +++ b/api/@ohos.fileManager.d.ts @@ -42,6 +42,7 @@ declare namespace filemanager { * @param {AsyncCallback} [callback] - callback. * @returns {void | Promise} no callback return Promise otherwise return void * @throws {TypedError} Parameter check failed + * @systemapi */ declare function listFile(path: string, type: string, options?: {dev?: DevInfo, offset?: number, count?: number}): Promise; declare function listFile(path: string, type: string, options?: {dev?: DevInfo, offset?: number, count?: number}, AsyncCallback): void; @@ -59,6 +60,7 @@ declare function listFile(path: string, type: string, options?: {dev?: DevInfo, * @param {AsyncCallback} [callback] - callback. * @returns {void | Promise} no callback return Promise otherwise return void * @throws {TypedError} Parameter check failed + * @systemapi */ declare function getRoot(options?: {dev?: DevInfo}): Promise; declare function getRoot(options?: {dev?: DevInfo}, callback: AsyncCallback): void; @@ -78,6 +80,7 @@ declare function getRoot(options?: {dev?: DevInfo}, callback: AsyncCallback} no callback return Promise otherwise return void * @throws {TypedError} Parameter check failed + * @systemapi */ declare function createFile(path: string, filename: string, options?: {dev?: DevInfo}): Promise; declare function createFile(path: string, filename: string, options?: {dev?: DevInfo}, callback: AsyncCallback): void; @@ -88,6 +91,7 @@ declare function createFile(path: string, filename: string, options?: {dev?: Dev * @syscap SystemCapability.FileManagement.FileManagerService * @since 9 * @permission N/A + * @systemapi */ declare interface FileInfo { /** @@ -128,6 +132,7 @@ declare interface FileInfo { * @syscap SystemCapability.FileManagement.FileManagerService * @since 9 * @permission N/A + * @systemapi */ declare interface DevInfo { /** diff --git a/api/@ohos.storageStatistics.d.ts b/api/@ohos.storageStatistics.d.ts index e8fa8d8634..be578883e2 100644 --- a/api/@ohos.storageStatistics.d.ts +++ b/api/@ohos.storageStatistics.d.ts @@ -20,12 +20,14 @@ import {AsyncCallback, Callback} from "./basic"; * * @since 8 * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics + * @systemapi */ declare namespace storageStatistics { /** * Get the totalSize of volume. * * @since 8 + * @systemapi */ function getTotalSizeOfVolume(volumeUuid: string, callback: AsyncCallback): void; function getTotalSizeOfVolume(volumeUuid: string): Promise; @@ -33,6 +35,7 @@ declare namespace storageStatistics { * Get the free size Of volume. * * @since 8 + * @systemapi */ function getFreeSizeOfVolume(volumeUuid: string, callback: AsyncCallback): void; function getFreeSizeOfVolume(volumeUuid: string): Promise; @@ -41,6 +44,7 @@ declare namespace storageStatistics { * Get the bundlestat * * @since 9 + * @systemapi */ export interface BundleStats { diff --git a/api/@ohos.volumeManager.d.ts b/api/@ohos.volumeManager.d.ts index 563201404b..ec710a259d 100644 --- a/api/@ohos.volumeManager.d.ts +++ b/api/@ohos.volumeManager.d.ts @@ -20,6 +20,7 @@ import {AsyncCallback, Callback} from "./basic"; * * @since 9 * @syscap SystemCapability.FileManagement.StorageService.Volume + * @systemapi */ declare namespace volumeManager { @@ -27,6 +28,7 @@ declare namespace volumeManager { * Get All Volumes * * @since 9 + * @systemapi */ export interface Volume { id: string; @@ -44,6 +46,7 @@ function getAllVolumes(): Promise>; * Mount * * @since 9 + * @systemapi */ function mount(volumeId: string, callback: AsyncCallback): void; function mount(volumeId: string): Promise; @@ -52,6 +55,7 @@ function mount(volumeId: string): Promise; * UnMount * * @since 9 + * @systemapi */ function unmount(volumeId: string, callback: AsyncCallback): void; function unmount(volumeId: string): Promise; -- Gitee