/foundation/distributeddatamgr/kv_store/frameworks/native/kv_store/src/kvstore_impl_posix/ |
H A D | kv_store.c | 40 static int GetResolvedPath(const char* dataPath, const char* key, char* resolvedPath, unsigned int len)
in GetResolvedPath() argument 46 if (sprintf_s(keyPath, MAX_KEY_PATH + 1, "%s/%s/%s", dataPath, KVSTORE_PATH, key) < 0) {
in GetResolvedPath() 64 static int GetValueByFile(const char* dataPath, const char* key, char* value, unsigned int len)
in GetValueByFile() argument 70 if (GetResolvedPath(dataPath, key, keyPath, PATH_MAX + 1) != EC_SUCCESS) {
in GetValueByFile() 99 static int SetValueToFile(const char* dataPath, const char* key, const char* value)
in SetValueToFile() argument 105 if (GetResolvedPath(dataPath, key, keyPath, PATH_MAX + 1) != EC_SUCCESS) {
in SetValueToFile() 121 static int DeleteValueFromFile(const char* dataPath, const char* key)
in DeleteValueFromFile() argument 127 if (sprintf_s(keyPath, MAX_KEY_PATH + 1, "%s/%s/%s", dataPath, KVSTORE_PATH, key) < 0) {
in DeleteValueFromFile() 136 static int InitKv(const char* dataPath)
in InitKv() argument 138 if (dataPath in InitKv() 161 GetCurrentItem(const char* dataPath) GetCurrentItem() argument 193 NewItem(const char* dataPath, const char* key) NewItem() argument 217 const char* dataPath = g_dataPath; UtilsGetValue() local 246 const char* dataPath = g_dataPath; UtilsSetValue() local 285 const char* dataPath = g_dataPath; UtilsDeleteValue() local [all...] |
/foundation/multimedia/media_foundation/test/scenetest/helper/ |
H A D | lite_stream_player.cpp | 133 int ReadDataFromFile(std::string dataPath) in ReadDataFromFile() argument 136 if (OSAL::ConvertFullPath(dataPath, dataFullPath) && !dataFullPath.empty()) { in ReadDataFromFile() 137 dataPath = dataFullPath; in ReadDataFromFile() 139 std::fstream fs(dataPath); in ReadDataFromFile() 141 std::cout << "failed to open " << dataPath << '\n'; in ReadDataFromFile() local 164 int StartLiteStreamPlayer(const std::string& dataPath) in StartLiteStreamPlayer() argument 180 testDataSize = ReadDataFromFile(dataPath); in StartLiteStreamPlayer()
|
/foundation/arkui/ace_engine_lite/frameworks/src/core/context/ |
H A D | js_app_context.cpp | 359 const char *dataPath = GetDataPath(); in GetResourcePath() local 360 if (dataPath == nullptr || strlen(dataPath) == 0) { in GetResourcePath() 361 dataPath = currentBundleName_; in GetResourcePath() 363 char *relocatedPath = RelocateResourceFilePath(dataPath, path); in GetResourcePath() 382 char *dataPath = StringUtil::Malloc(dataPathSize); in ProcessResourcePathByConfiguration() local 383 if (dataPath == nullptr) { in ProcessResourcePathByConfiguration() 391 if (sprintf_s(dataPath, dataPathSize + 1, fmtStr, appDataRoot, currentBundleName_) < 0) { in ProcessResourcePathByConfiguration() 393 ACE_FREE(dataPath); in ProcessResourcePathByConfiguration() 396 char *relocatedPath = RelocateResourceFilePath(dataPath, slicedFilePat in ProcessResourcePathByConfiguration() [all...] |
/foundation/bundlemanager/bundle_framework_lite/services/bundlemgr_lite/bundle_daemon/src/ |
H A D | bundle_daemon_handler.cpp | 131 int32_t BundleDaemonHandler::CreateDataDirectory(const char *dataPath, int32_t uid, int32_t gid, bool isChown) in CreateDataDirectory() argument 133 if (!IsValideDataPath(dataPath)) { in CreateDataDirectory() 137 std::string dataDir = std::string(dataPath); in CreateDataDirectory() 144 PRINTE("BundleDaemonHandler", "create dataPath fail"); in CreateDataDirectory() 156 int32_t BundleDaemonHandler::RemoveInstallDirectory(const char *codePath, const char *dataPath, bool keepData) in RemoveInstallDirectory() argument 160 result = IsValideDataPath(dataPath) && BundleFileUtils::RemoveFile(dataPath) && result; in RemoveInstallDirectory() 268 bool BundleDaemonHandler::IsValideDataPath(const char *dataPath) in IsValideDataPath() argument 270 if (dataPath == nullptr) { in IsValideDataPath() 273 return BundleFileUtils::IsValidPath(STORAGE + HAP_DATA_PATH, dataPath) || in IsValideDataPath() [all...] |
H A D | bundle_daemon.cpp | 196 const char *dataPath = reinterpret_cast<char *>(ReadString(req, &len)); in CreateDataDirectoryInvoke() local 197 if (dataPath == nullptr || len == 0) { in CreateDataDirectoryInvoke() 207 return BundleDaemon::GetInstance().handler_.CreateDataDirectory(dataPath, uid, gid, isChown); in CreateDataDirectoryInvoke() 253 std::string dataPath = ""; in RemoveInstallDirectoryInvoke() local 254 int32_t ret = ObtainStringFromIpc(req, codePath, dataPath); in RemoveInstallDirectoryInvoke() 260 return BundleDaemon::GetInstance().handler_.RemoveInstallDirectory(codePath.c_str(), dataPath.c_str(), keepData); in RemoveInstallDirectoryInvoke()
|
/foundation/bundlemanager/bundle_framework/test/systemtest/common/bms/bms_sandbox_app_system_test/ |
H A D | bundle_mgr_sandbox_app_system_test.cpp | 254 auto dataPath = BUNDLE_DATA_DIR1 + innerBundleName; in CheckPathAreExisted() local 255 int32_t ret = access(dataPath.c_str(), F_OK); in CheckPathAreExisted() 258 dataPath = BUNDLE_DATA_DIR2 + innerBundleName; in CheckPathAreExisted() 259 ret = access(dataPath.c_str(), F_OK); in CheckPathAreExisted() 262 dataPath = BUNDLE_DATA_DIR3 + innerBundleName + "/cache"; in CheckPathAreExisted() 263 ret = access(dataPath.c_str(), F_OK); in CheckPathAreExisted() 266 dataPath = BUNDLE_DATA_DIR3 + innerBundleName + "/files"; in CheckPathAreExisted() 267 ret = access(dataPath.c_str(), F_OK); in CheckPathAreExisted() 270 dataPath = BUNDLE_DATA_DIR3 + innerBundleName + "/haps"; in CheckPathAreExisted() 271 ret = access(dataPath in CheckPathAreExisted() 290 auto dataPath = BUNDLE_DATA_DIR1 + innerBundleName; CheckPathAreNonExisted() local [all...] |
/foundation/bundlemanager/bundle_framework_lite/frameworks/bundle_lite/src/ |
H A D | bundle_info_utils.cpp | 56 SetBundleInfoDataPath(des, src.dataPath); in CopyBundleInfo() 97 des->dataPath = src.dataPath; in CopyBundleInfoNoReplication() 197 bool BundleInfoUtils::SetBundleInfoDataPath(BundleInfo *bundleInfo, const char *dataPath) in SetBundleInfoDataPath() argument 199 if (bundleInfo == nullptr || dataPath == nullptr) { in SetBundleInfoDataPath() 203 AdapterFree(bundleInfo->dataPath); in SetBundleInfoDataPath() 204 bundleInfo->dataPath = Utils::Strdup(dataPath); in SetBundleInfoDataPath() 205 return bundleInfo->dataPath != nullptr; in SetBundleInfoDataPath()
|
H A D | bundle_info.cpp | 32 AdapterFree(bundleInfo->dataPath); in ClearBundleInfo()
|
/foundation/ability/ability_lite/frameworks/ability_lite/src/ |
H A D | ability_env.cpp | 36 const std::string &dataPath = OHOS::AbilityEnvImpl::GetInstance().GetDataPath(); in GetDataPath() local 37 return dataPath.c_str(); in GetDataPath()
|
H A D | ability_scheduler.cpp | 48 char *dataPath = reinterpret_cast<char *>(ReadString(data, nullptr)); in AmsCallback() local 49 if ((bundleName == nullptr) || (srcPath == nullptr) || (dataPath == nullptr)) { in AmsCallback() 50 HILOG_ERROR(HILOG_MODULE_APP, "ams call back error, bundleName, srcPath or dataPath is null"); in AmsCallback() 55 appInfo.dataPath = dataPath; in AmsCallback()
|
H A D | ability_env_impl.cpp | 24 dataPath_ = appInfo.dataPath; in SetAppInfo()
|
/foundation/bundlemanager/bundle_framework_lite/services/bundlemgr_lite/bundle_daemon/include/ |
H A D | bundle_daemon_handler.h | 30 int32_t CreateDataDirectory(const char *dataPath, int32_t uid, int32_t gid, bool isChown); 34 int32_t RemoveInstallDirectory(const char *codePath, const char *dataPath, bool keepData);
|
/foundation/bundlemanager/bundle_framework_lite/services/bundlemgr_lite/include/ |
H A D | bundle_daemon_client.h | 39 int32_t CreateDataDirectory(const char *dataPath, int32_t uid, int32_t gid, bool isChown); 43 int32_t RemoveInstallDirectory(const char *codePath, const char *dataPath, bool keepData);
|
H A D | gt_bundle_installer.h | 48 const char *dataPath, bool isUpdate); 100 BundleUtil::RemoveDir(bundleInfo->dataPath); \
|
/foundation/bundlemanager/bundle_framework_lite/services/bundlemgr_lite/src/ |
H A D | bundle_daemon_client.cpp | 270 int32_t BundleDaemonClient::CreateDataDirectory(const char *dataPath, int32_t uid, int32_t gid, bool isChown) in RegisterCallback() argument 275 if (dataPath == nullptr) { in RegisterCallback() 282 WriteString(&request, dataPath); in RegisterCallback() 364 int32_t BundleDaemonClient::RemoveInstallDirectory(const char *codePath, const char *dataPath, bool keepData) in RegisterCallback() argument 369 if (codePath == nullptr || dataPath == nullptr) { in RegisterCallback() 374 return CallClientInvoke(REMOVE_INSTALL_DIRECTORY, codePath, dataPath, keepData); in RegisterCallback()
|
H A D | bundle_info_creator.cpp | 56 index = std::string(info->dataPath).find_last_of(PATH_SEPARATOR); in SaveBundleInfo() 58 HILOG_ERROR(HILOG_MODULE_APP, "dataPath is invalid!"); in SaveBundleInfo() 63 dataDirPath = std::string(info->dataPath).substr(0, index); in SaveBundleInfo() 123 // set codePath and dataPath in SetBundleInfo() 125 std::string dataPath = dataDirPath + PATH_SEPARATOR + bundleProfile.bundleName; in SetBundleInfo() local 126 if (codePath.size() > PATH_LENGTH || dataPath.size() > PATH_LENGTH) { in SetBundleInfo() 127 HILOG_ERROR(HILOG_MODULE_APP, "codePath or dataPath length exceed max value!"); in SetBundleInfo() 155 !BundleInfoUtils::SetBundleInfoDataPath(bundleInfo, dataPath.c_str()) || in SetBundleInfo()
|
H A D | gt_bundle_installer.cpp | 301 errorCode = HandleFileAndBackUpRecord(installRecord, tmpCodePath, randStr, bundleInfo->dataPath, isUpdate); in ProcessBundleInstall() 345 char *dstRawFilePathComp[] = {const_cast<char *>(bundleInfo->dataPath), const_cast<char *>(RAW_FILE)}; in MoveRawFileToDataPath() 450 const char *randStr, const char *dataPath, bool isUpdate) in HandleFileAndBackUpRecord() 452 if (tmpPath == nullptr || dataPath == nullptr) { in HandleFileAndBackUpRecord() 481 (void) BundleUtil::RemoveDir(dataPath); in HandleFileAndBackUpRecord() 482 if (!BundleUtil::MkDirs(dataPath)) { in HandleFileAndBackUpRecord() 612 if (!(BundleUtil::RemoveDir(bundleInfo->codePath) && BundleUtil::RemoveDir(bundleInfo->dataPath))) { in Uninstall() 449 HandleFileAndBackUpRecord(const InstallRecord &record, const char *tmpPath, const char *randStr, const char *dataPath, bool isUpdate) HandleFileAndBackUpRecord() argument
|
/foundation/ability/ability_lite/frameworks/ability_lite/include/ |
H A D | app_info.h | 25 std::string dataPath; member
|
/foundation/bundlemanager/bundle_framework/services/bundlemgr/test/unittest/bms_bundle_sandbox_app_test/ |
H A D | bms_bundle_sandbox_app_test.cpp | 316 auto dataPath = BUNDLE_DATA_DIR1 + innerBundleName; in CheckPathAreExisted() local 317 int32_t ret = access(dataPath.c_str(), F_OK); in CheckPathAreExisted() 320 dataPath = BUNDLE_DATA_DIR2 + innerBundleName; in CheckPathAreExisted() 321 ret = access(dataPath.c_str(), F_OK); in CheckPathAreExisted() 324 dataPath = BUNDLE_DATA_DIR3 + innerBundleName + "/cache"; in CheckPathAreExisted() 325 ret = access(dataPath.c_str(), F_OK); in CheckPathAreExisted() 328 dataPath = BUNDLE_DATA_DIR3 + innerBundleName + "/files"; in CheckPathAreExisted() 329 ret = access(dataPath.c_str(), F_OK); in CheckPathAreExisted() 332 dataPath = BUNDLE_DATA_DIR3 + innerBundleName + "/haps"; in CheckPathAreExisted() 333 ret = access(dataPath in CheckPathAreExisted() 352 auto dataPath = BUNDLE_DATA_DIR1 + innerBundleName; CheckPathAreNonExisted() local [all...] |
/foundation/multimedia/media_foundation/test/scenetest/ |
H A D | test_lite_stream_player.h | 23 int StartLiteStreamPlayer(std::string dataPath);
|
/foundation/ability/ability_runtime/test/unittest/frameworks_kits_appkit_native_test/ |
H A D | application_env_impl_test.cpp | 87 appInfo.dataPath = "/dataDir"; in HWTEST_F() 106 appInfo.dataPath = "/dataDir"; in HWTEST_F()
|
/foundation/ability/ability_runtime/frameworks/native/appkit/app/ |
H A D | application_env_impl.cpp | 30 dataPath_ = appInfo.dataPath; in SetAppInfo()
|
/foundation/bundlemanager/bundle_framework_lite/interfaces/kits/bundle_lite/ |
H A D | bundle_info.h | 102 char *dataPath; member
|
/foundation/ability/ability_runtime/interfaces/kits/native/appkit/app/ |
H A D | application_env_impl.h | 31 std::string dataPath; member
|
/foundation/bundlemanager/bundle_framework_lite/frameworks/bundle_lite/include/ |
H A D | bundle_info_utils.h | 34 static bool SetBundleInfoDataPath(BundleInfo *bundleInfo, const char *dataPath);
|