raw_file_manager.h

Overview

Provides file management functions for the rawfile directory. You can use the ResourceManager to open a rawfile and perform operations such as data search and reading.

System capability: SystemCapability.Global.ResourceManager

Library: librawfile.z.so

Since: 8

Related module: Rawfile

Summary

Types

Name Description
typedef struct NativeResourceManagerNativeResourceManager Represents the native ResourceManager.

Function

Name Description
NativeResourceManager * OH_ResourceManager_InitNativeResourceManager (napi_env env, napi_value jsResMgr) Obtains the native ResourceManager based on the JS ResourceManager to implement rawfile-specific functions.
void OH_ResourceManager_ReleaseNativeResourceManager (NativeResourceManager *resMgr) Releases the native ResourceManager.
RawDir * OH_ResourceManager_OpenRawDir (const NativeResourceManager *mgr, const char *dirName) Traverses all files in the rawfile directory.
RawFile * OH_ResourceManager_OpenRawFile (const NativeResourceManager *mgr, const char *fileName) Opens a rawfile and reads the data in it.
RawFile64 * OH_ResourceManager_OpenRawFile64 (const NativeResourceManager *mgr, const char *fileName) Opens a large rawfile and reads the data in it.
bool OH_ResourceManager_IsRawDir (const NativeResourceManager *mgr, const char *path) Checks whether a path is a subdirectory in the rawfile directory.