diff --git a/entry/src/main/cpp/FileAccessMethods.cpp b/entry/src/main/cpp/FileAccessMethods.cpp index c65c7837aff7a5f9923bee77657582db61538564..77679b8d7f340039207c219f3a346801bdfadc32 100644 --- a/entry/src/main/cpp/FileAccessMethods.cpp +++ b/entry/src/main/cpp/FileAccessMethods.cpp @@ -40,10 +40,10 @@ static napi_value TransferSandboxPath(napi_env env, napi_callback_info info) { // [End get_path] //Open the file through the specified path. snprintf(pathBuf, sizeof(pathBuf), "%s/TransferSandboxPath.txt", pathBuf); - // [Start fp] + // [Start fp] FILE *fp; fp = fopen(pathBuf, "w"); - // [End fp] + // [End fp] if (fp == nullptr) { OH_LOG_Print(LOG_APP, LOG_ERROR, DOMAIN, TAG, "Open file error!"); return nullptr; @@ -69,10 +69,10 @@ static napi_value SplicePath(napi_env env, napi_callback_info info) { // [End path_buf] //Convert the contents of the text to be written into C-side variables through the Node-API interface. char contentsBuf[256]; - // [Start value_utf8] + // [Start value_utf8] // [Start value_string] napi_get_value_string_utf8(env, argv[0], contentsBuf, sizeof(contentsBuf), &contentsSize); - // [End value_string] + // [End value_string] // [End value_utf8] // [Start fp1] //Open the file through the specified path.