1# Globalization Subsystem Changelog 2 3## cl.resourceManager.1 Change in the Meaning of the Return Value for the API Used to Obtain the rawfile Descriptor 4 5Changed the meaning of the return value for the API used to obtain the rawfile descriptor after the non-decompression feature is added in this version. The change in the meaning of the return value, namely, **descriptor: RawFileDescriptor {fd, offset, length}**, is described as follows: 6 7**Before change:** 8 9**fd**: file descriptor for accessing the rawfile. 10 11**offset**: offset for accessing the rawfile. In this case, the value is **0**. 12 13**length**: size of the rawfile to access. 14 15**After change:** 16 17**fd**: file descriptor for accessing the HAP where the rawfile is located. 18 19**offset**: offset of the accessed rawfile relative to the HAP. 20 21**length**: size of the rawfile to access. 22 23**Change Impact** 24 25In versions earlier than 4.0.2.2, the rawfile can be accessed only through **fd**. In version 4.0.2.2 or later, the rawfile can be accessed only through **{fd, offset, and length}**. 26 27**Key API/Component Changes** 28 29| **Original API** | 30| ---------------- | 31| getRawFd(path: string, callback: AsyncCallback\<RawFileDescriptor>): void | 32| getRawFd(path: string): Promise\<RawFileDescriptor> | 33| getRawFileDescriptor(path: string, callback: AsyncCallback\<RawFileDescriptor>): void| 34| getRawFileDescriptor(path: string): Promise\<RawFileDescriptor>| 35|| 36 37**Sample Code** 38 39The following is an example of calling the **getRawFd** API: 40``` 41try { 42 this.context.resourceManager.getRawFd("test.ogg", (error, value) => { 43 if (error != null) { 44 console.log(`callback getRawFd failed error code: ${error.code}, message: ${error.message}.`); 45 } else { 46 let fileDescriptor = { 47 fd = value.fd, 48 offset = value.offset, 49 length = value.length 50 } 51 this.avPlayer.fdSrc(fileDescriptor); // Take the audio player as an example. When calling fdSrc, pass fileDescriptor in addition to fd. 52 } 53 }); 54 } catch (error) { 55 console.error(`callback getRawFd failed, error code: ${error.code}, message: ${error.message}.`) 56 }; 57``` 58