• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# JS API Changes of the File Management Subsystem
2
3The table below lists the APIs changes of the file management subsystem in OpenHarmony 3.2 Beta1 over OpenHarmony 3.1 Release.
4
5## API Changes
6
7| Module| Class| Method/Attribute/Enumeration/Constant| Change Type|
8|---|---|---|---|
9| ohos.securityLabel | securityLabel | getSecurityLabelSync(path:string): string; | Added|
10| ohos.securityLabel | securityLabel | getSecurityLabel(path:string, callback: AsyncCallback\<string>): void;<br>getSecurityLabel(path:string): Promise\<string>; | Added|
11| ohos.securityLabel | securityLabel | setSecurityLabelSync(path:string, type:dataLevel): void; | Added|
12| ohos.securityLabel | securityLabel | setSecurityLabel(path:string, type:dataLevel, callback: AsyncCallback\<void>): void;<br>setSecurityLabel(path:string, type:dataLevel): Promise\<void>; | Added|
13| ohos.storageStatistics | storageStatistics | getFreeSize(callback: AsyncCallback\<number>): void;<br>getFreeSize(): Promise\<number>; | Added|
14| ohos.storageStatistics | storageStatistics | getTotalSize(callback: AsyncCallback\<number>): void;<br>getTotalSize(): Promise\<number>; | Added|
15| ohos.storageStatistics | storageStatistics | getUserStorageStats(userId?: number): Promise\<StorageStats>;<br>getUserStorageStats(callback: AsyncCallback\<StorageStats>): void;<br>getUserStorageStats(userId: number, callback: AsyncCallback\<StorageStats>): void; | Added|
16| ohos.storageStatistics | StorageStats | app: number; | Added|
17| ohos.storageStatistics | StorageStats | file: number; | Added|
18| ohos.storageStatistics | StorageStats | image: number; | Added|
19| ohos.storageStatistics | StorageStats | video: number; | Added|
20| ohos.storageStatistics | StorageStats | audio: number; | Added|
21| ohos.storageStatistics | StorageStats | total: number; | Added|
22| ohos.storageStatistics | storageStatistics | getSystemSize(callback: AsyncCallback\<number>): void;<br>getSystemSize(): Promise\<number>; | Added|
23| ohos.storageStatistics | storageStatistics | getCurrentBundleStats(callback: AsyncCallback\<BundleStats>): void;<br>getCurrentBundleStats(): Promise\<BundleStats>; | Added|
24| ohos.storageStatistics | storageStatistics | getBundleStats(packageName: string,  callback: AsyncCallback\<BundleStats>): void;<br>getBundleStats(packageName: string): Promise\<BundleStats>; | Added|
25| ohos.storageStatistics | BundleStats | dataSize: number; | Added|
26| ohos.storageStatistics | BundleStats | cacheSize: number; | Added|
27| ohos.storageStatistics | BundleStats | appSize: number; | Added|
28| ohos.volumeManager | volumeManager | partition(volId: string, fstype: string, callback: AsyncCallback\<void>): void;<br>partition(volId: string, fstype: string): Promise\<void>; | Added|
29| ohos.volumeManager | volumeManager | format(volId: string, callback: AsyncCallback\<void>): void;<br>format(volId: string): Promise\<void>; | Added|
30| ohos.volumeManager | volumeManager | setVolumeDescription(uuid: string, description: string, callback: AsyncCallback\<void>): void;<br>setVolumeDescription(uuid: string, description: string): Promise\<void>; | Added|
31| ohos.volumeManager | volumeManager | getVolumeById(id: string, callback: AsyncCallback\<Volume>): void;<br>getVolumeById(id: string): Promise\<Volume>; | Added|
32| ohos.volumeManager | volumeManager | getVolumeByUuid(uuid: string, callback: AsyncCallback\<Volume>): void;<br>getVolumeByUuid(uuid: string): Promise\<Volume>; | Added|
33| ohos.volumeManager | volumeManager | unmount(volumeId: string, callback: AsyncCallback\<boolean>): void;<br>unmount(volumeId: string): Promise\<boolean>; | Added|
34| ohos.volumeManager | volumeManager | mount(volumeId: string, callback: AsyncCallback\<boolean>): void;<br>mount(volumeId: string): Promise\<boolean>; | Added|
35| ohos.volumeManager | volumeManager | getAllVolumes(callback: AsyncCallback\<Array\<Volume>>): void;<br>getAllVolumes(): Promise\<Array\<Volume>>; | Added|
36| ohos.volumeManager | Volume | path: string; | Added|
37| ohos.volumeManager | Volume | state: number; | Added|
38| ohos.volumeManager | Volume | removable: boolean; | Added|
39| ohos.volumeManager | Volume | description: string; | Added|
40| ohos.volumeManager | Volume | uuid: string; | Added|
41| ohos.volumeManager | Volume | id: string; | Added|
42