harmony 鸿蒙raw_file.h

  • 2025-06-12
  • 浏览 (5)

raw_file.h

Overview

Provides functions related to rawfiles, including searching for, reading, and closing rawfiles.

Since: 8

Related module: Rawfile

Summary

Structs

Name Description
struct  RawFileDescriptor Defines the file descriptor information of a file in the rawfile directory.
struct  RawFileDescriptor64 Defines the file descriptor of a large rawfile.

Types

Name Description
typedef struct RawFile RawFile Provides access to rawfiles.
typedef struct RawFile64 RawFile64 Provides access to large rawfiles.

Function

Name Description
int OH_ResourceManager_ReadRawFile (const RawFile *rawFile, void *buf, size_t length) Reads data of the specified length from the current position in a rawfile.
int OH_ResourceManager_SeekRawFile (const RawFile *rawFile, long offset, int whence) Searches for the data read/write position in a rawfile based on the specified offset.
long OH_ResourceManager_GetRawFileSize (RawFile *rawFile) Obtains the length of the rawfile, in long.
long OH_ResourceManager_GetRawFileRemainingLength (const RawFile *rawFile) Obtains the remaining length of the rawfile, in long.
void OH_ResourceManager_CloseRawFile (RawFile *rawFile) Closes a RawFile and releases all associated resources.
long OH_ResourceManager_GetRawFileOffset (const RawFile *rawFile) Obtains the current offset of a rawfile, in long.
bool OH_ResourceManager_GetRawFileDescriptor (const RawFile *rawFile, RawFileDescriptor &descriptor) Opens a rawfile based on the specified offset (in long) and file length (in long) and obtains the file descriptor.
bool OH_ResourceManager_ReleaseRawFileDescriptor (const RawFileDescriptor &descriptor) Releases a file descriptor.
bool OH_ResourceManager_ReleaseRawFileDescriptorData (const RawFileDescriptor *descriptor) Releases a file descriptor.
int64_t OH_ResourceManager_ReadRawFile64 (const RawFile64 *rawFile, void *buf, int64_t length) Reads data of the specified length from the current position in a large rawfile.
int OH_ResourceManager_SeekRawFile64 (const RawFile64 *rawFile, int64_t offset, int whence) Searches for the data read/write position in a large rawfile based on the specified offset.
int64_t OH_ResourceManager_GetRawFileSize64 (RawFile64 *rawFile) Obtains the length of a large rawfile, in int64_t.
int64_t OH_ResourceManager_GetRawFileRemainingLength64 (const RawFile64 *rawFile) Obtains the remaining length of a large rawfile, in int64_t.
void OH_ResourceManager_CloseRawFile64 (RawFile64 *rawFile) Closes a RawFile64 and releases all associated resources.
int64_t OH_ResourceManager_GetRawFileOffset64 (const RawFile64 *rawFile) Obtains the offset of a large rawfile, in int64_t.
bool OH_ResourceManager_GetRawFileDescriptor64 (const RawFile64 *rawFile, RawFileDescriptor64 *descriptor) Opens a large rawfile based on the specified offset (in int64_t) and file length (in int64_t) and obtains the file descriptor.
bool OH_ResourceManager_ReleaseRawFileDescriptor64 (const RawFileDescriptor64 *descriptor) Releases a file descriptor.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Localization Kit

harmony 鸿蒙RawFileDescriptor

harmony 鸿蒙RawFileDescriptor64

harmony 鸿蒙ResourceManager_Configuration

harmony 鸿蒙Font Management Error Codes

harmony 鸿蒙I18N Error Codes

harmony 鸿蒙Resource Manager Error Codes

harmony 鸿蒙@ohos.fontManager (Font Management)

harmony 鸿蒙@ohos.i18n (Internationalization) (System API)

harmony 鸿蒙@ohos.i18n (Internationalization)

0  赞