/base/startup/init/test/unittest/fs_manager/erofs/ |
H A D | erofs_remount_unittest.cpp | 45 const char *srcPath = STARTUP_INIT_UT_PATH"/data/modem2Exchange"; in HWTEST_F() local 48 CheckAndCreateDir(srcPath); in HWTEST_F() 52 int ret = Modem2Exchange(srcPath, targetPath); in HWTEST_F() 56 ret = Modem2Exchange(srcPath, targetPath); in HWTEST_F() 59 rmdir(srcPath); in HWTEST_F() 65 const char *srcPath = STARTUP_INIT_UT_PATH"/data/Exchange2Mode"; in HWTEST_F() local 68 int ret = Exchange2Modem(srcPath, targetPath); in HWTEST_F() 71 CheckAndCreateDir(srcPath); in HWTEST_F() 77 ret = Exchange2Modem(srcPath, targetPath); in HWTEST_F() 84 Exchange2Modem(srcPath, targetPat in HWTEST_F() [all...] |
/base/theme/wallpaper_mgr/frameworks/kits/extension/src/ |
H A D | js_wallpaper_extension_ability.cpp | 66 std::string srcPath = ""; in Init() local 67 GetSrcPath(srcPath); in Init() 68 if (srcPath.empty()) { in Init() 69 HILOG_ERROR("Failed to get srcPath!"); in Init() 72 return InitMoudle(srcPath); in Init() 75 void JsWallpaperExtensionAbility::InitMoudle(std::string srcPath) in InitMoudle() argument 82 moduleName, srcPath, abilityInfo_->hapPath, Extension::abilityInfo_->compileMode == CompileMode::ES_MODULE); in InitMoudle() 216 void JsWallpaperExtensionAbility::GetSrcPath(std::string &srcPath) in GetSrcPath() argument 221 srcPath.append(Extension::abilityInfo_->package); in GetSrcPath() 222 srcPath in GetSrcPath() [all...] |
/base/security/huks/utils/compatibility_bin/ |
H A D | compatibility_small_bin.c | 86 static void MoveOldFileToNew(const char *srcPath, const char *tarPath) in MoveOldFileToNew() argument 90 if ((in = fopen(srcPath, "r")) == NULL) { in MoveOldFileToNew() 112 (void)remove(srcPath); in MoveOldFileToNew() 116 const char *srcPath, const char *tarPath) in ConstructSrcAndTargetPath() 118 int ret = strcpy_s(curPath, DEFAULT_PATH_LEN, srcPath); in ConstructSrcAndTargetPath() 148 static void MoveOldFolderToNew(const char *srcPath, const char *tarPath) in MoveOldFolderToNew() argument 157 DIR *dir = opendir(srcPath); in MoveOldFolderToNew() 166 ret = ConstructSrcAndTargetPath(curPath, desPath, ptr, srcPath, tarPath); in MoveOldFolderToNew() 181 (void)rmdir(srcPath); in MoveOldFolderToNew() 115 ConstructSrcAndTargetPath(char *curPath, char *desPath, struct dirent *ptr, const char *srcPath, const char *tarPath) ConstructSrcAndTargetPath() argument
|
/base/hiviewdfx/hiview/adapter/plugins/eventservice/service/idl/include/ |
H A D | data_publisher_sys_event_callback.h | 29 DataPublisherSysEventCallback(std::string srcPath, std::string destPath, in DataPublisherSysEventCallback() argument 30 int32_t fileIndex, int32_t totalJsonSize): srcPath_(srcPath), in DataPublisherSysEventCallback() 35 void HandleEventFile(const std::string &srcPath, const std::string &desPath);
|
/base/inputmethod/imf/frameworks/kits/extension/src/ |
H A D | js_inputmethod_extension.cpp | 104 std::string srcPath; in Init() local 105 GetSrcPath(srcPath); in Init() 106 if (srcPath.empty()) { in Init() 107 IMSA_HILOGE("failed to get srcPath!"); in Init() 113 IMSA_HILOGI("JsInputMethodExtension, module: %{public}s, srcPath:%{public}s.", moduleName.c_str(), srcPath.c_str()); in Init() 116 jsObj_ = jsRuntime_.LoadModule(moduleName, srcPath, abilityInfo_->hapPath, in Init() 384 void JsInputMethodExtension::GetSrcPath(std::string &srcPath) in GetSrcPath() argument 389 srcPath.append(Extension::abilityInfo_->package); in GetSrcPath() 390 srcPath in GetSrcPath() [all...] |
/base/print/print_fwk/frameworks/kits/extension/src/ |
H A D | js_print_extension.cpp | 81 std::string srcPath = ""; in InitExtensionObj() local 82 GetSrcPath(srcPath); in InitExtensionObj() 83 if (srcPath.empty()) { in InitExtensionObj() 84 PRINT_HILOGE("Failed to get srcPath"); in InitExtensionObj() 90 PRINT_HILOGD("Init module:%{public}s,srcPath:%{public}s.", moduleName.c_str(), srcPath.c_str()); in InitExtensionObj() 93 jsObj_ = jsRuntime.LoadModule(moduleName, srcPath, abilityInfo_->hapPath, in InitExtensionObj() 286 void JsPrintExtension::GetSrcPath(std::string &srcPath) in GetSrcPath() argument 291 srcPath.append(Extension::abilityInfo_->package); in GetSrcPath() 292 srcPath in GetSrcPath() [all...] |
/base/customization/enterprise_device_management/framework/extension/src/ |
H A D | js_enterprise_admin_extension.cpp | 53 std::string srcPath; in Init() local 54 GetSrcPath(srcPath); in Init() 55 if (srcPath.empty()) { in Init() 56 EDMLOGI("JsEnterpriseAdminExtension Failed to get srcPath"); in Init() 62 EDMLOGI("JsEnterpriseAdminExtension::Init moduleName:%{public}s,srcPath:%{public}s.", in Init() 63 moduleName.c_str(), srcPath.c_str()); in Init() 66 jsObj_ = jsRuntime_.LoadModule(moduleName, srcPath, abilityInfo_->hapPath, in Init() 279 void JsEnterpriseAdminExtension::GetSrcPath(std::string& srcPath) in GetSrcPath() argument 282 srcPath.append(Extension::abilityInfo_->moduleName + "/"); in GetSrcPath() 283 srcPath in GetSrcPath() [all...] |
/base/hiviewdfx/hiview/adapter/plugins/eventservice/service/idl/src/ |
H A D | data_publisher.cpp | 159 std::string srcPath = TEMP_SRC_DIR; in OnSysEvent() local 161 auto task = std::bind(&DataPublisher::HandleSubscribeTask, this, event, srcPath, timeStr); in OnSysEvent() 165 HandleSubscribeTask(event, srcPath, timeStr); in OnSysEvent() 170 std::string srcPath, std::string timeStr) in HandleSubscribeTask() 173 if (!FileUtil::SaveStringToFile(srcPath, eventJson + ",", true)) { in HandleSubscribeTask() 188 auto res = OHOS::HiviewDFX::DataShareUtil::CopyFile(srcPath.c_str(), desPath.c_str()); in HandleSubscribeTask() 258 std::string srcPath = TEMP_EXPORT_SRC_DIR; in AddExportTask() local 259 if (!FileUtil::RemoveFile(srcPath)) { in AddExportTask() 266 auto task = [queryWrapper, srcPath, desPath] { in AddExportTask() 268 new(std::nothrow) DataPublisherSysEventCallback(srcPath, desPat in AddExportTask() 169 HandleSubscribeTask(std::shared_ptr<OHOS::HiviewDFX::SysEvent> &event, std::string srcPath, std::string timeStr) HandleSubscribeTask() argument [all...] |
H A D | data_publisher_sys_event_callback.cpp | 68 void DataPublisherSysEventCallback::HandleEventFile(const std::string &srcPath, const std::string &desPath) in HandleEventFile() argument 70 auto res = OHOS::HiviewDFX::DataShareUtil::CopyFile(srcPath.c_str(), desPath.c_str()); in HandleEventFile() 74 if (!FileUtil::RemoveFile(srcPath)) { in HandleEventFile()
|
/base/startup/init/services/modules/init_eng/ |
H A D | init_eng.c | 154 char srcPath[PATH_MAX] = {}; in DebugFilesOverlay() local 159 if (snprintf_s(srcPath, PATH_MAX, PATH_MAX - 1, "%s/%s", source, de->d_name) == -1) { in DebugFilesOverlay() 170 DebugFilesOverlay(srcPath, target); in DebugFilesOverlay() 172 BindMountFile(srcPath, target); in DebugFilesOverlay() 174 PLUGIN_LOGI("Ignore %s while overlaying", srcPath); in DebugFilesOverlay()
|
/base/hiviewdfx/hidumper/frameworks/native/src/util/ |
H A D | zip_utils.cpp | 22 bool ZipUtils::ZipFolder(const std::string &srcPath, const std::string &dstFile, const ZipTickNotify notify) in ZipFolder() argument 24 DUMPER_HILOGD(MODULE_COMMON, "enter|srcPath=[%{public}s], dstFile=[%{public}s]", in ZipFolder() 25 srcPath.c_str(), dstFile.c_str()); in ZipFolder() 27 std::string srcFolder = IncludeTrailingPathDelimiter(srcPath); in ZipFolder()
|
/base/location/frameworks/native/fence_extension_ability/src/ |
H A D | js_fence_extension.cpp | 121 std::string srcPath = ""; in Init() local 122 GetSrcPath(srcPath); in Init() 123 if (srcPath.empty()) { in Init() 124 LBSLOGE(FENCE_EXTENSION, "Failed to get srcPath"); in Init() 131 "JsFenceExtension::Init module:%{public}s,srcPath:%{public}s", in Init() 133 srcPath.c_str()); in Init() 137 moduleName, srcPath, abilityInfo_->hapPath, abilityInfo_->compileMode == CompileMode::ES_MODULE); in Init() 266 void JsFenceExtension::GetSrcPath(std::string &srcPath) in GetSrcPath() argument 269 srcPath.append(Extension::abilityInfo_->moduleName); in GetSrcPath() 270 srcPath in GetSrcPath() [all...] |
/base/hiviewdfx/hiview/base/event_publish/ |
H A D | event_publish.cpp | 88 std::string srcPath = PATH_DIR; in GetTempFilePath() local 89 srcPath.append(FILE_PREFIX).append(std::to_string(uid)).append(FILE_SUFFIX); in GetTempFilePath() 90 return srcPath; in GetTempFilePath() 335 for (const auto& srcPath : files) { in SendEventToSandBox() 336 std::string uidStr = StringUtil::GetMidSubstr(srcPath, FILE_PREFIX, FILE_SUFFIX); in SendEventToSandBox() 344 (void)FileUtil::RemoveFile(srcPath); in SendEventToSandBox() 350 (void)FileUtil::RemoveFile(srcPath); in SendEventToSandBox() 354 if (FileUtil::CopyFile(srcPath, desPath) == -1) { in SendEventToSandBox() 358 HIVIEW_LOGI("copy srcPath to desPath success."); in SendEventToSandBox() 359 (void)FileUtil::RemoveFile(srcPath); in SendEventToSandBox() 381 std::string srcPath = GetTempFilePath(uid); PushEvent() local [all...] |
/base/notification/common_event_service/frameworks/extension/src/ |
H A D | js_static_subscriber_extension.cpp | 101 std::string srcPath(Extension::abilityInfo_->moduleName + "/"); in Init() 102 srcPath.append(Extension::abilityInfo_->srcEntrance); in Init() 103 srcPath.erase(srcPath.rfind('.')); in Init() 104 srcPath.append(".abc"); in Init() 108 EVENT_LOGD("moduleName: %{public}s, srcPath: %{public}s.", moduleName.c_str(), srcPath.c_str()); in Init() 112 jsObj_ = jsRuntime_.LoadModule(moduleName, srcPath, abilityInfo_->hapPath, in Init()
|
/base/startup/appspawn/service/hnp/base/ |
H A D | hnp_file.c | 100 int GetRealPath(char *srcPath, char *realPath)
in GetRealPath() argument 104 if (srcPath == NULL || realPath == NULL) {
in GetRealPath() 111 MultiByteToWideChar(CP_ACP, 0, srcPath, -1, wideSrcPath, MAX_FILE_PATH_LEN);
in GetRealPath() 115 char *ret = realpath(srcPath, dstTmpPath);
in GetRealPath() 118 HNP_LOGE("realpath unsuccess. path=%{public}s", srcPath);
in GetRealPath()
|
/base/global/i18n/services/src/ |
H A D | hmos_libphonenumber_mount.cpp | 70 std::string srcPath = CFG_PATH + DATA_FILES[i]; in CopyDataFile() local 72 if (!FileExist(srcPath)) { in CopyDataFile() 76 if (!FileCopy(srcPath, dstPath)) { in CopyDataFile()
|
/base/hiviewdfx/hidumper/frameworks/native/include/util/ |
H A D | zip_utils.h | 24 // srcPath = /data/local/tmp/zipdata/ 27 static bool ZipFolder(const std::string &srcPath, const std::string &dstFile,
|
/base/hiviewdfx/hiview/plugins/event_store/event_export/task/export/ |
H A D | event_write_handler.cpp | 62 jsonFileWriter->SetExportJsonFileZippedListener([this] (const std::string& srcPath, in GetEventWriter() 64 zippedExportFileMap_[srcPath] = destPath; in GetEventWriter()
|
/base/update/sys_installer/frameworks/installer_manager/src/ |
H A D | installer_manager.cpp | 97 int32_t InstallerManager::AccDecompressAndVerifyPkg(const std::string &srcPath, in AccDecompressAndVerifyPkg() argument 104 return helper_->AccDecompressAndVerifyPkg(srcPath, dstPath, type); in AccDecompressAndVerifyPkg()
|
/base/update/sys_installer/frameworks/installer_manager/include/ |
H A D | installer_manager_helper.h | 34 virtual int32_t AccDecompressAndVerifyPkg(const std::string &srcPath, 51 virtual int32_t AccDecompressAndVerifyPkg(const std::string &srcPath,
|
/base/update/sys_installer/frameworks/ipc_server/src/ |
H A D | sys_installer_server.cpp | 84 int32_t SysInstallerServer::AccDecompressAndVerifyPkg(const std::string &srcPath, in AccDecompressAndVerifyPkg() argument 88 return InstallerManager::GetInstance().AccDecompressAndVerifyPkg(srcPath, dstPath, type); in AccDecompressAndVerifyPkg()
|
/base/theme/wallpaper_mgr/frameworks/kits/extension/include/ |
H A D | js_wallpaper_extension_ability.h | 117 void GetSrcPath(std::string &srcPath); 118 void InitMoudle(std::string srcPath);
|
/base/startup/init/remount/ |
H A D | remount_overlay.c | 366 char srcPath[PATH_MAX] = {};
in EngFilesOverlay() local 371 if (snprintf_s(srcPath, PATH_MAX, PATH_MAX - 1, "%s/%s", source, de->d_name) == -1) {
in EngFilesOverlay() 382 EngFilesOverlay(srcPath, target);
in EngFilesOverlay() 384 MountBindEngFile(srcPath, target);
in EngFilesOverlay() 386 INIT_LOGI("Ignore %s while overlaying", srcPath);
in EngFilesOverlay()
|
/base/security/security_guard/frameworks/common/utils/include/ |
H A D | security_guard_utils.h | 29 static bool CopyFile(const std::string &srcPath, const std::string &dstPath);
|
/base/security/security_guard/frameworks/common/utils/src/ |
H A D | security_guard_utils.cpp | 118 bool SecurityGuardUtils::CopyFile(const std::string &srcPath, const std::string &dstPath)
in CopyFile() argument 120 std::ifstream src(srcPath, std::ios::binary);
in CopyFile()
|