diff --git a/interfaces/kits/js/src/mod_fileio/properties/open_v9.cpp b/interfaces/kits/js/src/mod_fileio/properties/open_v9.cpp index 208a938e018ea4400067ae5d25999f65740dd96b..a8a1542f4a3888b220cadb7c22c2f196b7840356 100644 --- a/interfaces/kits/js/src/mod_fileio/properties/open_v9.cpp +++ b/interfaces/kits/js/src/mod_fileio/properties/open_v9.cpp @@ -146,11 +146,11 @@ napi_value OpenV9::Async(napi_env env, napi_callback_info info) NVal thisVar(env, funcArg.GetThisVar()); if (funcArg.GetArgc() == NARG_CNT::ONE || (funcArg.GetArgc() == NARG_CNT::TWO && NVal(env, funcArg[NARG_POS::SECOND]).TypeIs(napi_number))) { - return NAsyncWorkPromise(env, thisVar).Schedule(openV9ProcedureName, cbExec, cbCompl).val_; + return NAsyncWorkPromise(env, thisVar).Schedule(PROCEDURE_OPEN_NAME, cbExec, cbCompl).val_; } else { int cbIdx = ((funcArg.GetArgc() == NARG_CNT::THREE) ? NARG_POS::THIRD : NARG_POS::SECOND); NVal cb(env, funcArg[cbIdx]); - return NAsyncWorkCallback(env, thisVar, cb).Schedule(openV9ProcedureName, cbExec, cbCompl).val_; + return NAsyncWorkCallback(env, thisVar, cb).Schedule(PROCEDURE_OPEN_NAME, cbExec, cbCompl).val_; } } } // namespace ModuleFileIO diff --git a/interfaces/kits/js/src/mod_fileio/properties/open_v9.h b/interfaces/kits/js/src/mod_fileio/properties/open_v9.h index 5bb57a661f9580a831255de2e62c13aa176b1a73..93fbfd3e0f9234cee276789b704eee20500f97eb 100644 --- a/interfaces/kits/js/src/mod_fileio/properties/open_v9.h +++ b/interfaces/kits/js/src/mod_fileio/properties/open_v9.h @@ -26,7 +26,7 @@ public: static napi_value Async(napi_env env, napi_callback_info info); static napi_value Sync(napi_env env, napi_callback_info info); }; -const std::string openV9ProcedureName = "FILEIO_OPEN_V9"; +const std::string PROCEDURE_OPEN_NAME = "FileIOOpenV9"; } // namespace ModuleFileIO } // namespace DistributedFS } // namespace OHOS diff --git a/interfaces/kits/js/src/mod_fileio/properties/stat_v9.cpp b/interfaces/kits/js/src/mod_fileio/properties/stat_v9.cpp index e777f821cf4681423a5bba9723b2a01abed2dd56..86322baa783260f940c8f01f4c3c46fa0a9aa39e 100644 --- a/interfaces/kits/js/src/mod_fileio/properties/stat_v9.cpp +++ b/interfaces/kits/js/src/mod_fileio/properties/stat_v9.cpp @@ -142,10 +142,10 @@ napi_value StatV9::Async(napi_env env, napi_callback_info info) }; NVal thisVar(env, funcArg.GetThisVar()); if (funcArg.GetArgc() == NARG_CNT::ONE) { - return NAsyncWorkPromise(env, thisVar).Schedule(procedureStatName, cbExec, cbCompl).val_; + return NAsyncWorkPromise(env, thisVar).Schedule(PROCEDURE_STAT_NAME, cbExec, cbCompl).val_; } else { NVal cb(env, funcArg[NARG_POS::SECOND]); - return NAsyncWorkCallback(env, thisVar, cb).Schedule(procedureStatName, cbExec, cbCompl).val_; + return NAsyncWorkCallback(env, thisVar, cb).Schedule(PROCEDURE_STAT_NAME, cbExec, cbCompl).val_; } } } // namespace ModuleFileIO diff --git a/interfaces/kits/js/src/mod_fileio/properties/stat_v9.h b/interfaces/kits/js/src/mod_fileio/properties/stat_v9.h index 08eed2e5a8064cd49df84a2ddd01423a4c5e2135..ecdd703cde3290f1030a36501a609ff1547f22e0 100644 --- a/interfaces/kits/js/src/mod_fileio/properties/stat_v9.h +++ b/interfaces/kits/js/src/mod_fileio/properties/stat_v9.h @@ -26,7 +26,7 @@ public: static napi_value Async(napi_env env, napi_callback_info info); static napi_value Sync(napi_env env, napi_callback_info info); }; -const std::string procedureStatName = "FILEIO_STAT_V9"; +const std::string PROCEDURE_STAT_NAME = "FileIOStatV9"; } // namespace ModuleFileIO } // namespace DistributedFS } // namespace OHOS diff --git a/interfaces/kits/js/src/mod_fileio/properties/truncate_v9.cpp b/interfaces/kits/js/src/mod_fileio/properties/truncate_v9.cpp index e76741757f8d399d617f5d546fdddccfbf575b29..fd7777b63055f1bcd2bd425f97710bbfd11d3031 100644 --- a/interfaces/kits/js/src/mod_fileio/properties/truncate_v9.cpp +++ b/interfaces/kits/js/src/mod_fileio/properties/truncate_v9.cpp @@ -122,14 +122,13 @@ napi_value TruncateV9::Async(napi_env env, napi_callback_info info) return NVal::CreateUndefined(env); } }; - NVal thisVar(env, funcArg.GetThisVar()); if (funcArg.GetArgc() == NARG_CNT::ONE || (funcArg.GetArgc() == NARG_CNT::TWO && NVal(env, funcArg[NARG_POS::SECOND]).TypeIs(napi_number))) { - return NAsyncWorkPromise(env, thisVar).Schedule(procedureTruncateName, cbExec, cbCompl).val_; + return NAsyncWorkPromise(env, thisVar).Schedule(PROCEDURE_TRUNCATE_NAME, cbExec, cbCompl).val_; } else { NVal cb(env, funcArg[NARG_POS::THIRD]); - return NAsyncWorkCallback(env, thisVar, cb).Schedule(procedureTruncateName, cbExec, cbCompl).val_; + return NAsyncWorkCallback(env, thisVar, cb).Schedule(PROCEDURE_TRUNCATE_NAME, cbExec, cbCompl).val_; } } } // namespace ModuleFileIO diff --git a/interfaces/kits/js/src/mod_fileio/properties/truncate_v9.h b/interfaces/kits/js/src/mod_fileio/properties/truncate_v9.h index 37217db45a76f9ebd46a3925ea8876b8248709ca..2defe6b2de8530340271a26a6af79bd09971f755 100644 --- a/interfaces/kits/js/src/mod_fileio/properties/truncate_v9.h +++ b/interfaces/kits/js/src/mod_fileio/properties/truncate_v9.h @@ -29,7 +29,7 @@ public: static napi_value Sync(napi_env env, napi_callback_info info); static napi_value Async(napi_env env, napi_callback_info info); }; -const std::string procedureTruncateName = "FILEIO_TRUNCATE_V9"; +const std::string PROCEDURE_TRUNCATE_NAME = "FileIOTruncateV9"; } // namespace ModuleFileIO } // namespace DistributedFS } // namespace OHOS