1e41f4b71Sopenharmony_ci# raw_file.h 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci 4e41f4b71Sopenharmony_ci## Overview 5e41f4b71Sopenharmony_ci 6e41f4b71Sopenharmony_ciProvides functions related to rawfiles, including searching for, reading, and closing rawfiles. 7e41f4b71Sopenharmony_ci 8e41f4b71Sopenharmony_ci**Since**: 8 9e41f4b71Sopenharmony_ci 10e41f4b71Sopenharmony_ci**Related module**: [Rawfile](rawfile.md) 11e41f4b71Sopenharmony_ci 12e41f4b71Sopenharmony_ci 13e41f4b71Sopenharmony_ci## Summary 14e41f4b71Sopenharmony_ci 15e41f4b71Sopenharmony_ci 16e41f4b71Sopenharmony_ci### Structs 17e41f4b71Sopenharmony_ci 18e41f4b71Sopenharmony_ci| Name| Description| 19e41f4b71Sopenharmony_ci| -------- | -------- | 20e41f4b71Sopenharmony_ci| struct [RawFileDescriptor](_raw_file_descriptor.md) | Defines the file descriptor information of a file in the **rawfile** directory. | 21e41f4b71Sopenharmony_ci| struct [RawFileDescriptor64](_raw_file_descriptor64.md) | Defines the file descriptor of a large rawfile. | 22e41f4b71Sopenharmony_ci 23e41f4b71Sopenharmony_ci 24e41f4b71Sopenharmony_ci### Types 25e41f4b71Sopenharmony_ci 26e41f4b71Sopenharmony_ci| Name| Description| 27e41f4b71Sopenharmony_ci| -------- | -------- | 28e41f4b71Sopenharmony_ci| typedef struct [RawFile](rawfile.md#rawfile)[RawFile](rawfile.md#rawfile) | Provides access to rawfiles. | 29e41f4b71Sopenharmony_ci| typedef struct [RawFile64](rawfile.md#rawfile64)[RawFile64](rawfile.md#rawfile64) | Provides access to large rawfiles. | 30e41f4b71Sopenharmony_ci 31e41f4b71Sopenharmony_ci 32e41f4b71Sopenharmony_ci### Function 33e41f4b71Sopenharmony_ci 34e41f4b71Sopenharmony_ci| Name| Description| 35e41f4b71Sopenharmony_ci| -------- | -------- | 36e41f4b71Sopenharmony_ci| int [OH_ResourceManager_ReadRawFile](rawfile.md#oh_resourcemanager_readrawfile) (const [RawFile](rawfile.md#rawfile) \*rawFile, void \*buf, size_t length) | Reads data of the specified length from the current position in a rawfile. | 37e41f4b71Sopenharmony_ci| int [OH_ResourceManager_SeekRawFile](rawfile.md#oh_resourcemanager_seekrawfile) (const [RawFile](rawfile.md#rawfile) \*rawFile, long offset, int whence) | Searches for the data read/write position in a rawfile based on the specified offset. | 38e41f4b71Sopenharmony_ci| long [OH_ResourceManager_GetRawFileSize](rawfile.md#oh_resourcemanager_getrawfilesize) ([RawFile](rawfile.md#rawfile) \*rawFile) | Obtains the length of the rawfile, in long. | 39e41f4b71Sopenharmony_ci| long [OH_ResourceManager_GetRawFileRemainingLength](rawfile.md#oh_resourcemanager_getrawfileremaininglength) (const [RawFile](rawfile.md#rawfile) \*rawFile) | Obtains the remaining length of the rawfile, in long. | 40e41f4b71Sopenharmony_ci| void [OH_ResourceManager_CloseRawFile](rawfile.md#oh_resourcemanager_closerawfile) ([RawFile](rawfile.md#rawfile) \*rawFile) | Closes a [RawFile](rawfile.md#rawfile) and releases all associated resources. | 41e41f4b71Sopenharmony_ci| long [OH_ResourceManager_GetRawFileOffset](rawfile.md#oh_resourcemanager_getrawfileoffset) (const [RawFile](rawfile.md#rawfile) \*rawFile) | Obtains the current offset of a rawfile, in long. | 42e41f4b71Sopenharmony_ci| bool [OH_ResourceManager_GetRawFileDescriptor](rawfile.md#oh_resourcemanager_getrawfiledescriptor) (const [RawFile](rawfile.md#rawfile) \*rawFile, [RawFileDescriptor](_raw_file_descriptor.md) &descriptor) | Opens a rawfile based on the specified offset (in long) and file length (in long) and obtains the file descriptor. | 43e41f4b71Sopenharmony_ci| bool [OH_ResourceManager_ReleaseRawFileDescriptor](rawfile.md#oh_resourcemanager_releaserawfiledescriptor) (const [RawFileDescriptor](_raw_file_descriptor.md) &descriptor) | Releases a file descriptor. | 44e41f4b71Sopenharmony_ci| int64_t [OH_ResourceManager_ReadRawFile64](rawfile.md#oh_resourcemanager_readrawfile64) (const [RawFile64](rawfile.md#rawfile64) \*rawFile, void \*buf, int64_t length) | Reads data of the specified length from the current position in a large rawfile. | 45e41f4b71Sopenharmony_ci| int [OH_ResourceManager_SeekRawFile64](rawfile.md#oh_resourcemanager_seekrawfile64) (const [RawFile64](rawfile.md#rawfile64) \*rawFile, int64_t offset, int whence) | Searches for the data read/write position in a large rawfile based on the specified offset. | 46e41f4b71Sopenharmony_ci| int64_t [OH_ResourceManager_GetRawFileSize64](rawfile.md#oh_resourcemanager_getrawfilesize64) ([RawFile64](rawfile.md#rawfile64) \*rawFile) | Obtains the length of a large rawfile, in int64_t. | 47e41f4b71Sopenharmony_ci| int64_t [OH_ResourceManager_GetRawFileRemainingLength64](rawfile.md#oh_resourcemanager_getrawfileremaininglength64) (const [RawFile64](rawfile.md#rawfile64) \*rawFile) | Obtains the remaining length of a large rawfile, in int64_t. | 48e41f4b71Sopenharmony_ci| void [OH_ResourceManager_CloseRawFile64](rawfile.md#oh_resourcemanager_closerawfile64) ([RawFile64](rawfile.md#rawfile64) \*rawFile) | Closes a [RawFile64](rawfile.md#rawfile) and releases all associated resources. | 49e41f4b71Sopenharmony_ci| int64_t [OH_ResourceManager_GetRawFileOffset64](rawfile.md#oh_resourcemanager_getrawfileoffset64) (const [RawFile64](rawfile.md#rawfile64) \*rawFile) | Obtains the offset of a large rawfile, in int64_t. | 50e41f4b71Sopenharmony_ci| bool [OH_ResourceManager_GetRawFileDescriptor64](rawfile.md#oh_resourcemanager_getrawfiledescriptor64) (const [RawFile64](rawfile.md#rawfile64) \*rawFile, [RawFileDescriptor64](_raw_file_descriptor64.md) \*descriptor) | Opens a large rawfile based on the specified offset (in int64_t) and file length (in int64_t) and obtains the file descriptor. | 51e41f4b71Sopenharmony_ci| bool [OH_ResourceManager_ReleaseRawFileDescriptor64](rawfile.md#oh_resourcemanager_releaserawfiledescriptor64) (const [RawFileDescriptor64](_raw_file_descriptor64.md) \*descriptor) | Releases a file descriptor. | 52