diff --git a/entry/src/main/cpp/FileAccessMethods.cpp b/entry/src/main/cpp/FileAccessMethods.cpp index c63a591043d33b292eb1070db393b78e113f6895..364f2fa0f1f21613616b4ad7dfb53f15cd524883 100644 --- a/entry/src/main/cpp/FileAccessMethods.cpp +++ b/entry/src/main/cpp/FileAccessMethods.cpp @@ -107,8 +107,10 @@ static napi_value TransferResourceMgr(napi_env env, napi_callback_info info) { // [End native_manage] size_t fileNameSize; char fileNameBuf[BUFFER_SIZE]; + // [Start convert_fileName] //Convert the passed-in file name into a C-side variable through the Node-API interface. napi_get_value_string_utf8(env, argv[1], fileNameBuf, sizeof(fileNameBuf), &fileNameSize); + // [End convert_fileName] // [Start open_raw_file] //Open a file through a resource object RawFile *rawFile = OH_ResourceManager_OpenRawFile(mNativeResMgr, fileNameBuf);