1e41f4b71Sopenharmony_ci# File Subsystem Changelog
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci## cl.file.1 mediaLibrary APIs Changed
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ciAll APIs provided by the mediaLibrary module of the multimedia subsystem are deprecated.
6e41f4b71Sopenharmony_ci
7e41f4b71Sopenharmony_ci**Change Impact**
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ciAll APIs described in [mediaLibrary](../../../application-dev/reference/apis/js-apis-medialibrary.md) are deprecated. Third-party applications can only select and save files in the public directory by calling the APIs of [FilePicker](../../../application-dev/reference/apis/js-apis-file-picker.md).
10e41f4b71Sopenharmony_ciFor applications developed based on earlier versions, pay attention to the changes of APIs.
11e41f4b71Sopenharmony_ci
12e41f4b71Sopenharmony_ci**Key API/Component Changes**
13e41f4b71Sopenharmony_ci
14e41f4b71Sopenharmony_ciThe table below lists the **mediaLibrary** APIs that can be substituted by the **FilePicker** APIs.
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci| Module                   | Method/Attribute/Enum/Constant                                         | Change Type|
17e41f4b71Sopenharmony_ci| ------------------------- | ------------------------------------------------------------ | -------- |
18e41f4b71Sopenharmony_ci| medialibrary   |  **function** getMediaLibrary(context: Context): MediaLibrary; | Deprecated    |
19e41f4b71Sopenharmony_ci| medialibrary   |  **function** getFileAssets(options: MediaFetchOptions, callback: AsyncCallback\<FetchFileResult\>): void | Deprecated    |
20e41f4b71Sopenharmony_ci| medialibrary   |  **function** getFileAssets(options: MediaFetchOptions): Promise\<FetchFileResult\> | Deprecated    |
21e41f4b71Sopenharmony_ci| medialibrary   |  **function** createAsset(mediaType: MediaType, displayName: string, relativePath: string, callback: AsyncCallback\<FileAsset\>): void | Deprecated    |
22e41f4b71Sopenharmony_ci| medialibrary   |  **function** createAsset(mediaType: MediaType, displayName: string, relativePath: string): Promise\<FileAsset\> | Deprecated    |
23e41f4b71Sopenharmony_ci| medialibrary   |  **function** getPublicDirectory(type: DirectoryType, callback: AsyncCallback\<string\>): void | Deprecated    |
24e41f4b71Sopenharmony_ci| medialibrary   |  **function** getPublicDirectory(type: DirectoryType): Promise\<string\> | Deprecated    |
25e41f4b71Sopenharmony_ci| medialibrary   |  **function** release(callback: AsyncCallback\<void\>): void  | Deprecated    | 
26e41f4b71Sopenharmony_ci| medialibrary   |  **function** release(): Promise\<void\> | Deprecated    |
27e41f4b71Sopenharmony_ci| medialibrary   |  **function** FileAsset.open(mode: string, callback: AsyncCallback\<number\>): void | Deprecated    |
28e41f4b71Sopenharmony_ci| medialibrary   |  **function** FileAsset.open(mode: string): Promise\<number\> | Deprecated    |
29e41f4b71Sopenharmony_ci| medialibrary   |  **function** FileAsset.close(fd: number, callback: AsyncCallback\<void\>): void | Deprecated    |
30e41f4b71Sopenharmony_ci| medialibrary   |  **function** FileAsset.close(fd: number): Promise\<void\> | Deprecated    |
31e41f4b71Sopenharmony_ci| medialibrary   |  **function** FetchFileResult.getCount(): number | Deprecated    |
32e41f4b71Sopenharmony_ci| medialibrary   |  **function** FetchFileResult.isAfterLast(): boolean | Deprecated    |
33e41f4b71Sopenharmony_ci| medialibrary   |  **function** FetchFileResult.close(): void | Deprecated    |
34e41f4b71Sopenharmony_ci| medialibrary   |  **function** FetchFileResult.getFirstObject(callback: AsyncCallback\<FileAsset\>): void | Deprecated    |
35e41f4b71Sopenharmony_ci| medialibrary   |  **function** FetchFileResult.getFirstObject(): Promise\<FileAsset\> | Deprecated    |
36e41f4b71Sopenharmony_ci| medialibrary   |  **function** FetchFileResult.getNextObject(callback: AsyncCallback\<FileAsset\>): void | Deprecated    |
37e41f4b71Sopenharmony_ci| medialibrary   |  **function** FetchFileResult.getNextObject(): Promise\<FileAsset\> | Deprecated    |
38e41f4b71Sopenharmony_ci| medialibrary   |  **function** FetchFileResult.getLastObject(callback: AsyncCallback\<FileAsset\>): void | Deprecated    |
39e41f4b71Sopenharmony_ci| medialibrary   |  **function** FetchFileResult.getLastObject(): Promise\<FileAsset\> | Deprecated    |
40e41f4b71Sopenharmony_ci| medialibrary   |  **function** FetchFileResult.getPositionObject(index: number, callback: AsyncCallback\<FileAsset\>): void | Deprecated    |
41e41f4b71Sopenharmony_ci| medialibrary   |  **function** FetchFileResult.getPositionObject(index: number): Promise\<FileAsset\> | Deprecated    |
42e41f4b71Sopenharmony_ci| medialibrary   |  **function** FetchFileResult.getAllObject(callback: AsyncCallback\<Array\<FileAsset\>\>): void | Deprecated    |
43e41f4b71Sopenharmony_ci| medialibrary   |  **function** FetchFileResult.getAllObject(): Promise\<Array\<FileAsset\>\> | Deprecated    |
44e41f4b71Sopenharmony_ci| medialibrary   |  **function** Album.getFileAssets(options: MediaFetchOptions, callback: AsyncCallback\<FetchFileResult\>): void | Deprecated    |
45e41f4b71Sopenharmony_ci| medialibrary   |  **function** Album.getFileAssets(options?: MediaFetchOptions): Promise\<FetchFileResult\> | Deprecated    |
46e41f4b71Sopenharmony_ci| medialibrary   |  **enum** FileKey | Deprecated    |
47e41f4b71Sopenharmony_ci| medialibrary   |  **enum** DirectoryType | Deprecated    |
48e41f4b71Sopenharmony_ci| medialibrary   |  **enum** MediaType | Deprecated    |
49e41f4b71Sopenharmony_ci| medialibrary   |  **interface** MediaFetchOptions | Deprecated    |
50e41f4b71Sopenharmony_ci| medialibrary   |  **interface** FileAsset | Deprecated    |
51e41f4b71Sopenharmony_ci
52e41f4b71Sopenharmony_ci**Adaptation Guide**
53e41f4b71Sopenharmony_ci
54e41f4b71Sopenharmony_ci**The following example shows how to use the mediaLibrary APIs to edit a file in the public directory:**
55e41f4b71Sopenharmony_ci
56e41f4b71Sopenharmony_ci1. Call **getMediaLibrary** to obtain a **mediaLibrary** instance.
57e41f4b71Sopenharmony_ci2. Create a **MediaFetchOptions** object, and call **getFileAssets** to obtain files in the public directory.
58e41f4b71Sopenharmony_ci3. Call the **FetchFileResult** APIs to obtain the file asset of the target file.
59e41f4b71Sopenharmony_ci4. Call **fileAsset.open** to open the file and obtain the FD.
60e41f4b71Sopenharmony_ci5. Call [fs.writeSync](../../../application-dev/reference/apis/js-apis-file-fs.md#writesync) to edit the file through the FD.
61e41f4b71Sopenharmony_ci6. After the edit, call **fileAsset.close** to close the FD of the file.
62e41f4b71Sopenharmony_ci7. Call **fetchFileResult.close** to release the resources occupied by **getFileAssets**.
63e41f4b71Sopenharmony_ci8. Call **release** to release the **mediaLibrary** instance.
64e41f4b71Sopenharmony_ci
65e41f4b71Sopenharmony_ci**Example**
66e41f4b71Sopenharmony_ci
67e41f4b71Sopenharmony_ci```js
68e41f4b71Sopenharmony_ciimport mediaLibrary from '@ohos.multimedia.mediaLibrary';
69e41f4b71Sopenharmony_ciimport fs from '@ohos.file.fs';
70e41f4b71Sopenharmony_ci
71e41f4b71Sopenharmony_ciasync function example() {
72e41f4b71Sopenharmony_ci  try {
73e41f4b71Sopenharmony_ci    let context = getContext(this);
74e41f4b71Sopenharmony_ci    let media = mediaLibrary.getMediaLibrary(context);
75e41f4b71Sopenharmony_ci    let fileKeyObj = mediaLibrary.FileKey;
76e41f4b71Sopenharmony_ci    let imageType = mediaLibrary.MediaType.IMAGE;
77e41f4b71Sopenharmony_ci    let getImageOp = {
78e41f4b71Sopenharmony_ci      selections: fileKeyObj.MEDIA_TYPE + '= ?',
79e41f4b71Sopenharmony_ci      selectionArgs: [imageType.toString()],
80e41f4b71Sopenharmony_ci      order: fileKeyObj.DATE_ADDED + ' DESC',
81e41f4b71Sopenharmony_ci    };
82e41f4b71Sopenharmony_ci    const fetchFileResult = await media.getFileAssets(getImageOp);
83e41f4b71Sopenharmony_ci    const fileAsset = await fetchFileResult.getFirstObject();
84e41f4b71Sopenharmony_ci    console.info('mediaLibrary fileAsset displayName: ' + fileAsset.displayName);
85e41f4b71Sopenharmony_ci    let fd = await fileAsset.open('rw');
86e41f4b71Sopenharmony_ci    console.info('mediaLibrary fileAsset open fd: ' + fd);
87e41f4b71Sopenharmony_ci    let writeLen = fs.writeSync(fd, 'hello, world');
88e41f4b71Sopenharmony_ci    console.info('write data to file succeed and size is: ' + writeLen);
89e41f4b71Sopenharmony_ci    fileAsset.close(fd);
90e41f4b71Sopenharmony_ci    fetchFileResult.close();
91e41f4b71Sopenharmony_ci    media.release();
92e41f4b71Sopenharmony_ci  } catch (err) {
93e41f4b71Sopenharmony_ci    console.error('mediaLibrary fail, err: ' + err);
94e41f4b71Sopenharmony_ci  }
95e41f4b71Sopenharmony_ci}
96e41f4b71Sopenharmony_ci```
97e41f4b71Sopenharmony_ci
98e41f4b71Sopenharmony_ci**The following example shows how to use the FilePicker APIs to edit a file in the public directory:**
99e41f4b71Sopenharmony_ci
100e41f4b71Sopenharmony_ci1. Obtain a **DocumentViewPicker** object.
101e41f4b71Sopenharmony_ci2. Call **DocumentViewPicker.select** to select a file.
102e41f4b71Sopenharmony_ci3. After a file is selected, a file URI is returned.
103e41f4b71Sopenharmony_ci4. After the UI is returned from DocumentViewPicker, call [fs.openSync](../../../application-dev/reference/apis/js-apis-file-fs.md#fsopensync) to open the file based on the URI and obtain the FD.
104e41f4b71Sopenharmony_ci5. Call [fs.writeSync](../../../application-dev/reference/apis/js-apis-file-fs.md#writesync) to edit the file through the FD.
105e41f4b71Sopenharmony_ci6. After the edit, call [fs.closeSync](../../../application-dev/reference/apis/js-apis-file-fs.md#closesync) to close the FD.
106e41f4b71Sopenharmony_ci
107e41f4b71Sopenharmony_ci**Example**
108e41f4b71Sopenharmony_ci
109e41f4b71Sopenharmony_ci```js
110e41f4b71Sopenharmony_ciimport mediaLibrary from '@ohos.multimedia.mediaLibrary';
111e41f4b71Sopenharmony_ciimport picker from '@ohos.file.picker';
112e41f4b71Sopenharmony_ciimport fs from '@ohos.file.fs';
113e41f4b71Sopenharmony_ci
114e41f4b71Sopenharmony_cilet uri;
115e41f4b71Sopenharmony_ci
116e41f4b71Sopenharmony_ciasync function example() {
117e41f4b71Sopenharmony_ci  try {
118e41f4b71Sopenharmony_ci    let DocumentSelectOptions = new picker.DocumentSelectOptions();
119e41f4b71Sopenharmony_ci    let documentPicker = new picker.DocumentViewPicker();
120e41f4b71Sopenharmony_ci    documentPicker.select(DocumentSelectOptions).then((DocumentSelectResult) => {
121e41f4b71Sopenharmony_ci      console.info('DocumentViewPicker.select successfully, DocumentSelectResult uri: ' + JSON.stringify(DocumentSelectResult));
122e41f4b71Sopenharmony_ci      uri = DocumentSelectResult[0];
123e41f4b71Sopenharmony_ci    }).catch((err) => {
124e41f4b71Sopenharmony_ci      console.error('DocumentViewPicker.select failed with err: ' + err);
125e41f4b71Sopenharmony_ci    });
126e41f4b71Sopenharmony_ci  } catch (err) {
127e41f4b71Sopenharmony_ci    console.error('DocumentViewPicker failed with err: ' + err);
128e41f4b71Sopenharmony_ci  }
129e41f4b71Sopenharmony_ci}
130e41f4b71Sopenharmony_ci
131e41f4b71Sopenharmony_ciasync function writeFile() {
132e41f4b71Sopenharmony_ci  try {
133e41f4b71Sopenharmony_ci    let file = fs.openSync(uri, fs.OpenMode.READ_WRITE);
134e41f4b71Sopenharmony_ci    console.info('DocumentViewPicker file fd: ' + file.fd);
135e41f4b71Sopenharmony_ci    let writeLen = fs.writeSync(file.fd, 'hello, world');
136e41f4b71Sopenharmony_ci    console.info('write data to file succeed and size is: ' + writeLen);
137e41f4b71Sopenharmony_ci    fs.closeSync(file);
138e41f4b71Sopenharmony_ci  } catch (err) {
139e41f4b71Sopenharmony_ci    console.error('DocumentViewPicker fail, err: ' + err);
140e41f4b71Sopenharmony_ci  }
141e41f4b71Sopenharmony_ci}
142e41f4b71Sopenharmony_ci```
143e41f4b71Sopenharmony_ci
144e41f4b71Sopenharmony_ci**The following example shows how to use the mediaLibrary APIs to create a file in the public directory:**
145e41f4b71Sopenharmony_ci
146e41f4b71Sopenharmony_ci1. Call **getMediaLibrary** to obtain a **mediaLibrary** instance.
147e41f4b71Sopenharmony_ci2. Call **getPublicDirectory** to obtain the path of the public directory.
148e41f4b71Sopenharmony_ci3. Call **createAsset** to create a file and obtain the file asset.
149e41f4b71Sopenharmony_ci4. Call **fileAsset.open** to open the file and obtain the FD.
150e41f4b71Sopenharmony_ci5. Call **fs.write** to edit the file through the FD.
151e41f4b71Sopenharmony_ci6. After the edit, call **fileAsset.close** to close the FD.
152e41f4b71Sopenharmony_ci7. Call **release** to release the **mediaLibrary** instance.
153e41f4b71Sopenharmony_ci
154e41f4b71Sopenharmony_ci**Example**
155e41f4b71Sopenharmony_ci
156e41f4b71Sopenharmony_ci```js
157e41f4b71Sopenharmony_ciimport mediaLibrary from '@ohos.multimedia.mediaLibrary';
158e41f4b71Sopenharmony_ciimport fs from '@ohos.file.fs';
159e41f4b71Sopenharmony_ci
160e41f4b71Sopenharmony_ciasync function example() {
161e41f4b71Sopenharmony_ci  try {
162e41f4b71Sopenharmony_ci    let context = getContext(this);
163e41f4b71Sopenharmony_ci    let media = mediaLibrary.getMediaLibrary(context);
164e41f4b71Sopenharmony_ci    let mediaType = mediaLibrary.MediaType.FILE;
165e41f4b71Sopenharmony_ci    let DIR_DOWNLOAD = mediaLibrary.DirectoryType.DIR_DOWNLOAD;
166e41f4b71Sopenharmony_ci    const path = await media.getPublicDirectory(DIR_DOWNLOAD);
167e41f4b71Sopenharmony_ci    const fileAsset = await media.createAsset(mediaType, 'test.txt', path);
168e41f4b71Sopenharmony_ci    console.info('mediaLibrary fileAsset displayName: ' + fileAsset.displayName);
169e41f4b71Sopenharmony_ci    let fd = await fileAsset.open('rw');
170e41f4b71Sopenharmony_ci    console.info('mediaLibrary fileAsset open fd: ' + fd);
171e41f4b71Sopenharmony_ci    let writeLen = fs.writeSync(fd, 'hello, world');
172e41f4b71Sopenharmony_ci    console.info('write data to file succeed and size is: ' + writeLen);
173e41f4b71Sopenharmony_ci    fileAsset.close(fd);
174e41f4b71Sopenharmony_ci    media.release();
175e41f4b71Sopenharmony_ci  } catch (err) {
176e41f4b71Sopenharmony_ci    console.error('mediaLibrary fail, err: ' + err);
177e41f4b71Sopenharmony_ci  }
178e41f4b71Sopenharmony_ci}
179e41f4b71Sopenharmony_ci```
180e41f4b71Sopenharmony_ci
181e41f4b71Sopenharmony_ci**The following example shows how to use the FilePicker APIs to create a file in the public directory:**
182e41f4b71Sopenharmony_ci
183e41f4b71Sopenharmony_ci1. Obtain a **DocumentViewPicker** object.
184e41f4b71Sopenharmony_ci2. Call **DocumentViewPicker.save** to create and save an empty file.
185e41f4b71Sopenharmony_ci3. After the file is saved, a file URI is returned.
186e41f4b71Sopenharmony_ci4. After the UI is returned from DocumentViewPicker, call [fs.openSync](../../../application-dev/reference/apis/js-apis-file-fs.md#fsopensync) to open the file based on the URI and obtain the FD.
187e41f4b71Sopenharmony_ci5. Call [fs.writeSync](../../../application-dev/reference/apis/js-apis-file-fs.md#writesync) to edit the file through the FD.
188e41f4b71Sopenharmony_ci6. After the edit, call [fs.closeSync](../../../application-dev/reference/apis/js-apis-file-fs.md#closesync) to close the FD.
189e41f4b71Sopenharmony_ci
190e41f4b71Sopenharmony_ci**Example**
191e41f4b71Sopenharmony_ci
192e41f4b71Sopenharmony_ci```js
193e41f4b71Sopenharmony_ciimport mediaLibrary from '@ohos.multimedia.mediaLibrary';
194e41f4b71Sopenharmony_ciimport picker from '@ohos.file.picker';
195e41f4b71Sopenharmony_ciimport fs from '@ohos.file.fs';
196e41f4b71Sopenharmony_ci
197e41f4b71Sopenharmony_cilet uri;
198e41f4b71Sopenharmony_ci
199e41f4b71Sopenharmony_ciasync function example() {
200e41f4b71Sopenharmony_ci  try {
201e41f4b71Sopenharmony_ci    let DocumentSaveOptions = new picker.DocumentSaveOptions();
202e41f4b71Sopenharmony_ci    DocumentSaveOptions.newFileNames = ['DocumentViewPicker01.txt'];
203e41f4b71Sopenharmony_ci    let documentPicker = new picker.DocumentViewPicker();
204e41f4b71Sopenharmony_ci    documentPicker.save(DocumentSaveOptions).then((DocumentSaveResult) => {
205e41f4b71Sopenharmony_ci      console.info('DocumentViewPicker.save successfully, DocumentSaveResult uri: ' + JSON.stringify(DocumentSaveResult));
206e41f4b71Sopenharmony_ci      uri = DocumentSaveResult[0];
207e41f4b71Sopenharmony_ci    }).catch((err) => {
208e41f4b71Sopenharmony_ci      console.error('DocumentViewPicker.save failed with err: ' + err);
209e41f4b71Sopenharmony_ci    });
210e41f4b71Sopenharmony_ci  } catch (err) {
211e41f4b71Sopenharmony_ci    console.error('DocumentViewPicker failed with err: ' + err);
212e41f4b71Sopenharmony_ci  }
213e41f4b71Sopenharmony_ci}
214e41f4b71Sopenharmony_ci
215e41f4b71Sopenharmony_ciasync function writeFile() {
216e41f4b71Sopenharmony_ci  try {
217e41f4b71Sopenharmony_ci    let file = fs.openSync(uri, fs.OpenMode.READ_WRITE);
218e41f4b71Sopenharmony_ci    console.info('DocumentViewPicker file fd: ' + file.fd);
219e41f4b71Sopenharmony_ci    let writeLen = fs.writeSync(file.fd, 'hello, world');
220e41f4b71Sopenharmony_ci    console.info('write data to file succeed and size is: ' + writeLen);
221e41f4b71Sopenharmony_ci    fs.closeSync(file);
222e41f4b71Sopenharmony_ci  } catch (err) {
223e41f4b71Sopenharmony_ci    console.error('DocumentViewPicker fail, err: ' + err);
224e41f4b71Sopenharmony_ci  }
225e41f4b71Sopenharmony_ci}
226e41f4b71Sopenharmony_ci```
227e41f4b71Sopenharmony_ci
228e41f4b71Sopenharmony_ci**Key API/Component Changes**
229e41f4b71Sopenharmony_ci
230e41f4b71Sopenharmony_ciThe table below lists the mediaLibrary APIs that are not open to third-party applications due to function control. There are no substitute APIs for them.
231e41f4b71Sopenharmony_ci
232e41f4b71Sopenharmony_ci| Module                   | Method/Attribute/Enum/Constant                                         | Change Type|
233e41f4b71Sopenharmony_ci| ------------------------- | ------------------------------------------------------------ | -------- |
234e41f4b71Sopenharmony_ci| medialibrary   |  **function** getMediaLibrary(): MediaLibrary; | Deprecated    |
235e41f4b71Sopenharmony_ci| medialibrary   |  **function** on(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback: Callback\<void\>): void | Deprecated    |
236e41f4b71Sopenharmony_ci| medialibrary   |  **function** off(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback?: Callback\<void\>): void | Deprecated    |
237e41f4b71Sopenharmony_ci| medialibrary   |  **function** deleteAsset(uri: string): Promise\<void\> | Deprecated    |
238e41f4b71Sopenharmony_ci| medialibrary   |  **function** deleteAsset(uri: string, callback: AsyncCallback\<void\>): void | Deprecated    |
239e41f4b71Sopenharmony_ci| medialibrary   |  **function** storeMediaAsset(option: MediaAssetOption, callback: AsyncCallback\<string\>): void | Deprecated    |
240e41f4b71Sopenharmony_ci| medialibrary   |  **function** storeMediaAsset(option: MediaAssetOption): Promise\<string\> | Deprecated    |
241e41f4b71Sopenharmony_ci| medialibrary   |  **function** startImagePreview(images: Array\<string\>, index: number, callback: AsyncCallback\<void\>): void | Deprecated    |
242e41f4b71Sopenharmony_ci| medialibrary   |  **function** startImagePreview(images: Array\<string\>, callback: AsyncCallback\<void\>): void | Deprecated    |
243e41f4b71Sopenharmony_ci| medialibrary   |  **function** startImagePreview(images: Array\<string\>, index?: number): Promise\<void\> | Deprecated    |
244e41f4b71Sopenharmony_ci| medialibrary   |  **function** startMediaSelect(option: MediaSelectOption, callback: AsyncCallback\<Array\<string\>\>): void | Deprecated    |
245e41f4b71Sopenharmony_ci| medialibrary   |  **function** startMediaSelect(option: MediaSelectOption): Promise\<Array\<string\>\> | Deprecated    |
246e41f4b71Sopenharmony_ci| medialibrary   |  **function** getActivePeers(): Promise\<Array\<PeerInfo\>\>; | Deprecated    |
247e41f4b71Sopenharmony_ci| medialibrary   |  **function** getActivePeers(callback: AsyncCallback\<Array\<PeerInfo\>\>): void; | Deprecated    |
248e41f4b71Sopenharmony_ci| medialibrary   |  **function** getAllPeers(): Promise\<Array\<PeerInfo\>\>; | Deprecated    |
249e41f4b71Sopenharmony_ci| medialibrary   |  **function** FileAsset.isDirectory(callback: AsyncCallback\<boolean\>): void | Deprecated    |
250e41f4b71Sopenharmony_ci| medialibrary   |  **function** FileAsset.isDirectory():Promise\<boolean\> | Deprecated    |
251e41f4b71Sopenharmony_ci| medialibrary   |  **function** FileAsset.commitModify(callback: AsyncCallback\<void\>): void | Deprecated    |
252e41f4b71Sopenharmony_ci| medialibrary   |  **function** FileAsset.commitModify(): Promise\<void\> | Deprecated    |
253e41f4b71Sopenharmony_ci| medialibrary   |  **function** FileAsset.getThumbnail(callback: AsyncCallback\<image.PixelMap\>): void | Deprecated    |
254e41f4b71Sopenharmony_ci| medialibrary   |  **function** FileAsset.getThumbnail(size: Size, callback: AsyncCallback\<image.PixelMap\>): void | Deprecated    |
255e41f4b71Sopenharmony_ci| medialibrary   |  **function** FileAsset.getThumbnail(size?: Size): Promise\<image.PixelMap\> | Deprecated    |
256e41f4b71Sopenharmony_ci| medialibrary   |  **function** FileAsset.favorite(isFavorite: boolean, callback: AsyncCallback\<void\>): void | Deprecated    |
257e41f4b71Sopenharmony_ci| medialibrary   |  **function** FileAsset.favorite(isFavorite: boolean): Promise\<void\> | Deprecated    |
258e41f4b71Sopenharmony_ci| medialibrary   |  **function** FileAsset.isFavorite(callback: AsyncCallback\<boolean\>): void | Deprecated    |
259e41f4b71Sopenharmony_ci| medialibrary   |  **function** FileAsset.isFavorite():Promise\<boolean\>  | Deprecated    |
260e41f4b71Sopenharmony_ci| medialibrary   |  **function** FileAsset.trash(isTrash: boolean, callback: AsyncCallback\<void\>): void | Deprecated    |
261e41f4b71Sopenharmony_ci| medialibrary   |  **function** FileAsset.trash(isTrash: boolean): Promise\<void\> | Deprecated    |
262e41f4b71Sopenharmony_ci| medialibrary   |  **function** FileAsset.isTrash(callback: AsyncCallback\<boolean\>): void | Deprecated    |
263e41f4b71Sopenharmony_ci| medialibrary   |  **function** FileAsset.isTrash():Promise\<boolean\> | Deprecated    |
264e41f4b71Sopenharmony_ci| medialibrary   |  **function** getAlbums(options: MediaFetchOptions, callback: AsyncCallback\<Array\<Album\>\>): void | Deprecated    |
265e41f4b71Sopenharmony_ci| medialibrary   |  **function** getAlbums(options: MediaFetchOptions): Promise\<Array\<Album\>\> | Deprecated    |
266e41f4b71Sopenharmony_ci| medialibrary   |  **function** Album.commitModify(callback: AsyncCallback\<void\>): void | Deprecated    |
267e41f4b71Sopenharmony_ci| medialibrary   |  **function** Album.commitModify(): Promise\<void\> | Deprecated    |
268e41f4b71Sopenharmony_ci| medialibrary   |  **enum** DeviceType | Deprecated    |
269e41f4b71Sopenharmony_ci| medialibrary   |  **interface** PeerInfo | Deprecated    |
270e41f4b71Sopenharmony_ci| medialibrary   |  **interface** Size  | Deprecated    |
271e41f4b71Sopenharmony_ci| medialibrary   |  **interface** MediaAssetOption | Deprecated    |
272e41f4b71Sopenharmony_ci| medialibrary   |  **interface** MediaSelectOption | Deprecated    |
273