harmony(鸿蒙)JS API Changes of the File Management Subsystem

  • 2022-10-28
  • 浏览 (543)

JS API Changes of the File Management Subsystem

The table below lists the APIs changes of the file management subsystem in OpenHarmony 3.2 Beta1 over OpenHarmony 3.1 Release.

API Changes

Module Class Method/Attribute/Enumeration/Constant Change Type
ohos.securityLabel securityLabel getSecurityLabelSync(path:string): string; Added
ohos.securityLabel securityLabel getSecurityLabel(path:string, callback: AsyncCallback<string>): void;
getSecurityLabel(path:string): Promise<string>;
Added
ohos.securityLabel securityLabel setSecurityLabelSync(path:string, type:dataLevel): void; Added
ohos.securityLabel securityLabel setSecurityLabel(path:string, type:dataLevel, callback: AsyncCallback<void>): void;
setSecurityLabel(path:string, type:dataLevel): Promise<void>;
Added
ohos.storageStatistics storageStatistics getFreeSize(callback: AsyncCallback<number>): void;
getFreeSize(): Promise<number>;
Added
ohos.storageStatistics storageStatistics getTotalSize(callback: AsyncCallback<number>): void;
getTotalSize(): Promise<number>;
Added
ohos.storageStatistics storageStatistics getUserStorageStats(userId?: number): Promise<StorageStats>;
getUserStorageStats(callback: AsyncCallback<StorageStats>): void;
getUserStorageStats(userId: number, callback: AsyncCallback<StorageStats>): void;
Added
ohos.storageStatistics StorageStats app: number; Added
ohos.storageStatistics StorageStats file: number; Added
ohos.storageStatistics StorageStats image: number; Added
ohos.storageStatistics StorageStats video: number; Added
ohos.storageStatistics StorageStats audio: number; Added
ohos.storageStatistics StorageStats total: number; Added
ohos.storageStatistics storageStatistics getSystemSize(callback: AsyncCallback<number>): void;
getSystemSize(): Promise<number>;
Added
ohos.storageStatistics storageStatistics getCurrentBundleStats(callback: AsyncCallback<BundleStats>): void;
getCurrentBundleStats(): Promise<BundleStats>;
Added
ohos.storageStatistics storageStatistics getBundleStats(packageName: string, callback: AsyncCallback<BundleStats>): void;
getBundleStats(packageName: string): Promise<BundleStats>;
Added
ohos.storageStatistics BundleStats dataSize: number; Added
ohos.storageStatistics BundleStats cacheSize: number; Added
ohos.storageStatistics BundleStats appSize: number; Added
ohos.volumeManager volumeManager partition(volId: string, fstype: string, callback: AsyncCallback<void>): void;
partition(volId: string, fstype: string): Promise<void>;
Added
ohos.volumeManager volumeManager format(volId: string, callback: AsyncCallback<void>): void;
format(volId: string): Promise<void>;
Added
ohos.volumeManager volumeManager setVolumeDescription(uuid: string, description: string, callback: AsyncCallback<void>): void;
setVolumeDescription(uuid: string, description: string): Promise<void>;
Added
ohos.volumeManager volumeManager getVolumeById(id: string, callback: AsyncCallback<Volume>): void;
getVolumeById(id: string): Promise<Volume>;
Added
ohos.volumeManager volumeManager getVolumeByUuid(uuid: string, callback: AsyncCallback<Volume>): void;
getVolumeByUuid(uuid: string): Promise<Volume>;
Added
ohos.volumeManager volumeManager unmount(volumeId: string, callback: AsyncCallback<boolean>): void;
unmount(volumeId: string): Promise<boolean>;
Added
ohos.volumeManager volumeManager mount(volumeId: string, callback: AsyncCallback<boolean>): void;
mount(volumeId: string): Promise<boolean>;
Added
ohos.volumeManager volumeManager getAllVolumes(callback: AsyncCallback<Array<Volume>>): void;
getAllVolumes(): Promise<Array<Volume>>;
Added
ohos.volumeManager Volume path: string; Added
ohos.volumeManager Volume state: number; Added
ohos.volumeManager Volume removable: boolean; Added
ohos.volumeManager Volume description: string; Added
ohos.volumeManager Volume uuid: string; Added
ohos.volumeManager Volume id: string; Added

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)Readme

harmony(鸿蒙)JS API Changes of the Ability Framework

harmony(鸿蒙)JS API Changes of the ArkUI Development Framework

harmony(鸿蒙)JS API Changes of the Power Management Subsystem

harmony(鸿蒙)JS API Changes of the Bundle Management Framework

harmony(鸿蒙)JS API Changes of the Communication Subsystem

harmony(鸿蒙)JS API Changes of the DFX Subsystem

harmony(鸿蒙)JS API Changes of the Distributed Data Management Subsystem

harmony(鸿蒙)JS API Changes of the Common Event and Notification Subsystem

harmony(鸿蒙)JS API Changes of the Globalization Subsystem

0  赞