/foundation/multimedia/ringtone_library/services/ringtone_scanner/src/ |
H A D | ringtone_scanner_manager.cpp | 49 std::string realPath; in ScanFile() local 50 if (!PathToRealPath(path, realPath)) { in ScanFile() 55 if (!RingtoneScannerUtils::IsRegularFile(realPath)) { in ScanFile() 56 RINGTONE_ERR_LOG("the path %{private}s is not a regular file", realPath.c_str()); in ScanFile() 61 std::make_unique<RingtoneScannerObj>(realPath, callback, RingtoneScannerObj::FILE); in ScanFile() 72 std::string realPath; in ScanFileSync() local 73 if (!PathToRealPath(path, realPath)) { in ScanFileSync() 78 if (!RingtoneScannerUtils::IsRegularFile(realPath)) { in ScanFileSync() 79 RINGTONE_ERR_LOG("the path %{private}s is not a regular file", realPath.c_str()); in ScanFileSync() 83 RingtoneScannerObj scanner = RingtoneScannerObj(realPath, callbac in ScanFileSync() 97 std::string realPath; ScanDir() local 120 std::string realPath; ScanDirSync() local [all...] |
/foundation/multimedia/media_library/frameworks/services/media_scanner/src/scanner/ |
H A D | media_scanner_manager.cpp | 51 string realPath; in ScanFile() local 52 if (!PathToRealPath(path, realPath)) { in ScanFile() 57 if (!ScannerUtils::IsRegularFile(realPath)) { in ScanFile() 58 MEDIA_ERR_LOG("the path %{private}s is not a regular file", realPath.c_str()); in ScanFile() 63 std::make_unique<MediaScannerObj>(realPath, callback, MediaScannerObj::FILE, api); in ScanFile() 74 string realPath; in ScanFileSync() local 75 if (!PathToRealPath(path, realPath)) { in ScanFileSync() 80 if (!ScannerUtils::IsRegularFile(realPath)) { in ScanFileSync() 81 MEDIA_ERR_LOG("the path %{private}s is not a regular file", realPath.c_str()); in ScanFileSync() 85 MediaScannerObj scanner = MediaScannerObj(realPath, callbac in ScanFileSync() 100 string realPath; ScanFileSyncWithoutAlbumUpdate() local 126 string realPath; ScanDir() local 149 string realPath; ScanDirSync() local [all...] |
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/gaussdb_rd/src/common/src/ |
H A D | os_api.cpp | 49 char *realPath = new (std::nothrow) char[maxPathLength + 1]; in GetRealPath() local 50 if (realPath == nullptr) { in GetRealPath() 53 if (memset_s(realPath, maxPathLength + 1, 0, maxPathLength + 1) != EOK) { in GetRealPath() 54 delete[] realPath; in GetRealPath() 58 if (realpath(inOriPath.c_str(), realPath) == nullptr) { in GetRealPath() 60 delete[] realPath; in GetRealPath() 64 if (_fullpath(realPath, inOriPath.c_str(), maxPathLength) == nullptr) { in GetRealPath() 66 delete [] realPath; in GetRealPath() 70 outRealPath = std::string(realPath); in GetRealPath() 71 delete[] realPath; in GetRealPath() [all...] |
/foundation/resourceschedule/resource_schedule_service/ressched/plugins/cgroup_sched_plugin/framework/process_group/src/ |
H A D | process_group_util.cpp | 59 bool GetRealPath(const std::string& path, std::string& realPath) in GetRealPath() argument 66 realPath = std::string(resolvedPath); in GetRealPath() 72 std::string realPath; in ReadFileToString() local 73 if (!GetRealPath(filePath, realPath)) { in ReadFileToString() 76 int fd = open(realPath.c_str(), O_RDONLY | O_CLOEXEC); in ReadFileToString() 119 std::string realPath; in ReadFileToStringForVFS() local 120 if (!GetRealPath(filePath, realPath)) { in ReadFileToStringForVFS() 123 std::ifstream fin(realPath.c_str(), std::ios::in); in ReadFileToStringForVFS() 152 std::string realPath; in WriteStringToFile() local 153 if (!GetRealPath(filePath, realPath)) { in WriteStringToFile() [all...] |
H A D | cgroup_controller.cpp | 146 std::string realPath; in AddThreadSchedPolicy() local 147 if (!GetRealPath(filePath, realPath)) { in AddThreadSchedPolicy() 150 int fd = TEMP_FAILURE_RETRY(open(realPath.c_str(), O_WRONLY | O_CLOEXEC)); in AddThreadSchedPolicy() 168 std::string realPath; in AddThreadGroupSchedPolicy() local 169 if (!GetRealPath(filePath, realPath)) { in AddThreadGroupSchedPolicy() 172 int fd = TEMP_FAILURE_RETRY(open(realPath.c_str(), O_WRONLY | O_CLOEXEC)); in AddThreadGroupSchedPolicy()
|
/foundation/filemanagement/app_file_service/interfaces/innerkits/native/file_uri/src/ |
H A D | file_uri.cpp | 87 string realPath = sandboxPath; in GetRealPath() local 91 (access(realPath.c_str(), F_OK) == 0 || CheckFileManagerFullMountEnable())) { in GetRealPath() 92 return realPath; in GetRealPath() 97 realPath = PATH_SHARE + MODE_RW + bundleName + sandboxPath; in GetRealPath() 98 if (access(realPath.c_str(), F_OK) != 0) { in GetRealPath() 99 realPath = PATH_SHARE + MODE_R + bundleName + sandboxPath; in GetRealPath() 102 return realPath; in GetRealPath() 108 string realPath = sandboxPath; in GetRealPathBySA() local 112 (access(realPath.c_str(), F_OK) == 0 || CheckFileManagerFullMountEnable())) { in GetRealPathBySA() 113 return realPath; in GetRealPathBySA() [all...] |
/foundation/filemanagement/dfs_service/services/distributedfiledaemon/test/unittest/network/softbus/ |
H A D | softbus_session_listener_test.cpp | 151 string realPath = SoftBusSessionListener::GetRealPath(TEST_URI); in HWTEST_F() local 152 EXPECT_EQ(realPath, ""); in HWTEST_F() 154 realPath = SoftBusSessionListener::GetRealPath(testUri2); in HWTEST_F() 155 EXPECT_EQ(realPath, ""); in HWTEST_F() 157 realPath = SoftBusSessionListener::GetRealPath(testUri3); in HWTEST_F() 158 EXPECT_EQ(realPath, TEST_PATH); in HWTEST_F() 161 realPath = SoftBusSessionListener::GetRealPath(testUri4); in HWTEST_F() 162 EXPECT_EQ(realPath, ""); in HWTEST_F() 165 realPath = SoftBusSessionListener::GetRealPath(testUri5); in HWTEST_F() 166 EXPECT_EQ(realPath, ""); in HWTEST_F() [all...] |
/foundation/bundlemanager/bundle_framework/common/utils/src/ |
H A D | bundle_file_util.cpp | 48 bool BundleFileUtil::CheckFilePath(const std::string &bundlePath, std::string &realPath) in CheckFilePath() argument 63 if (!PathToRealPath(bundlePath, realPath)) { in CheckFilePath() 67 if (access(realPath.c_str(), F_OK) != 0) { in CheckFilePath() 68 APP_LOGE("access failed path: %{public}s errno %{public}d", realPath.c_str(), errno); in CheckFilePath() 71 if (!CheckFileSize(realPath, MAX_HAP_SIZE)) { in CheckFilePath() 93 std::string realPath = ""; in CheckFilePath() local 95 if (CheckFilePath(bundlePaths.front(), realPath)) { in CheckFilePath() 97 realPaths.emplace_back(realPath); in CheckFilePath() 108 std::string realPath = ""; in CheckFilePath() local 109 if (!CheckFilePath(bundlePath, realPath)) { in CheckFilePath() 186 std::string realPath = ""; GetHapFilesFromBundlePath() local [all...] |
/foundation/graphic/graphic_2d/frameworks/opengl_wrapper/src/EGL/ |
H A D | egl_wrapper_loader.cpp | 58 std::string realPath = ""; in LoadEgl() local 59 if (!PathToRealPath(path, realPath) || in LoadEgl() 60 strncmp(realPath.c_str(), VENDOR_LIB_PATH, strlen(VENDOR_LIB_PATH)) != 0) { in LoadEgl() 64 dlEglHandle_ = dlopen(realPath.c_str(), RTLD_NOW | RTLD_LOCAL); in LoadEgl() 68 if (!PathToRealPath(path, realPath) || in LoadEgl() 69 strncmp(realPath.c_str(), SYSTEM_LIB_PATH, strlen(SYSTEM_LIB_PATH)) != 0) { in LoadEgl() 73 dlEglHandle_ = dlopen(realPath.c_str(), RTLD_NOW | RTLD_LOCAL); in LoadEgl() 111 std::string realPath = ""; in LoadGl() local 113 if (!PathToRealPath(path, realPath) || in LoadGl() 114 strncmp(realPath in LoadGl() [all...] |
/foundation/multimodalinput/input/util/common/src/ |
H A D | util.cpp | 301 char realPath[PATH_MAX] = {}; in ReadProFile() local 302 CHKPV(realpath(filePath.c_str(), realPath)); in ReadProFile() 303 if (!IsValidProPath(realPath)) { in ReadProFile() 307 if (!IsFileExists(realPath)) { in ReadProFile() 311 if (!CheckFileExtendName(realPath, "pro")) { in ReadProFile() 315 auto fileSize = GetFileSize(realPath); in ReadProFile() 320 ReadProConfigFile(realPath, deviceId, configMap); in ReadProFile() 330 void ReadProConfigFile(const std::string &realPath, int32_t deviceId, in ReadProConfigFile() argument 334 std::ifstream reader(realPath); in ReadProConfigFile() 384 char realPath[PATH_MA in ReadJsonFile() local 437 ReadConfigFile(const std::string &realPath, DeviceConfig &devConf) ReadConfigFile() argument 481 char realPath[PATH_MAX] = {}; ReadTomlFile() local 518 char realPath[PATH_MAX] = {}; ReadCursorStyleFile() local 551 char realPath[PATH_MAX] = {}; FileVerification() local [all...] |
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/fuzztest/importfile_fuzzer/ |
H A D | importfile_fuzzer.cpp | 56 bool MakeImportFile(const uint8_t *data, size_t size, const std::string &realPath) in MakeImportFile() argument 58 std::ofstream ofs(realPath, std::ofstream::out); in MakeImportFile() 76 std::string realPath; in LLVMFuzzerTestOneInput() local 77 OS::GetRealPath(path, realPath); in LLVMFuzzerTestOneInput() 78 if (OHOS::MakeImportFile(data, size, realPath)) { in LLVMFuzzerTestOneInput() 79 OHOS::SingerVerImport(data, size, realPath); in LLVMFuzzerTestOneInput()
|
/foundation/distributeddatamgr/preferences/frameworks/native/src/ |
H A D | preferences_helper.cpp | 141 std::string realPath = GetRealPath(options.filePath, errCode); in GetPreferences() local 142 if (realPath == "" || errCode != E_OK) { in GetPreferences() 147 auto it = prefsCache_.find(realPath); in GetPreferences() 158 const_cast<Options &>(options).filePath = realPath; in GetPreferences() 159 std::string::size_type pos = realPath.find_last_of('/'); in GetPreferences() 160 std::string filePath = realPath.substr(0, pos); in GetPreferences() 162 LOG_ERROR("The path is invalid, prefName is %{public}s.", ExtractFileName(realPath).c_str()); in GetPreferences() 185 prefsCache_.insert({realPath, {pref, isEnhancePreferences}}); in GetPreferences() 192 std::string realPath = GetRealPath(path, errCode); in DeletePreferences() local 193 if (realPath in DeletePreferences() 246 std::string realPath = GetRealPath(path, errCode); RemovePreferencesFromCache() local [all...] |
/foundation/arkui/ace_engine/frameworks/base/utils/ |
H A D | utils.cpp | 21 bool RealPath(const std::string& fileName, char* realPath)
in RealPath() argument 24 return PathCanonicalize(realPath, fileName.c_str()) != 0;
in RealPath() 26 return realpath(fileName.c_str(), realPath) != nullptr;
in RealPath()
|
/foundation/graphic/graphic_2d/rosen/modules/render_service_profiler/ |
H A D | rs_profiler_utils.cpp | 245 std::string realPath; in GetRealPath() local 246 if (!PathToRealPath(path, realPath)) { in GetRealPath() 248 realPath.clear(); in GetRealPath() 250 return realPath; in GetRealPath() 303 const std::string realPath = GetRealPath(path); in IterateDirectory() local 304 if (realPath.empty()) { in IterateDirectory() 317 DIR* directory = opendir(realPath.data()); in IterateDirectory() 327 const std::string entryPath = NormalizePath(realPath) + entryName; in IterateDirectory() 342 const std::string realPath = GetRealPath(path); in LoadLine() local 343 if (realPath in LoadLine() 357 const std::string realPath = GetRealPath(path); LoadLines() local 375 const std::string realPath = GetRealPath(path); LoadContent() local 431 const std::string realPath = GetRealPath(path); FileDelete() local 447 const std::string realPath = GetRealPath(path); FileOpen() local [all...] |
/foundation/filemanagement/app_file_service/interfaces/common/src/ |
H A D | common_func.cpp | 111 string realPath = path; in GetUriFromPath() local 112 NormalizePath(realPath); in GetUriFromPath() 121 realPath = FILE_SCHEME_PREFIX + packageName + SandboxHelper::Encode(realPath); in GetUriFromPath() 122 return realPath; in GetUriFromPath()
|
/foundation/arkui/ace_engine/adapter/preview/entrance/ |
H A D | rs_dir_asset_provider.h | 61 char realPath[PATH_MAX] = { 0x00 }; variable 62 if (!RealPath(fileName, realPath)) { 65 auto fp = std::fopen(realPath, "rb"); 105 char realPath[PATH_MAX] = { 0x00 }; variable 106 if (!RealPath(fileName, realPath)) { 109 std::FILE* fp = std::fopen(realPath, "r");
|
/foundation/arkui/ace_engine/adapter/ohos/entrance/ |
H A D | file_asset_provider_impl.cpp | 55 char realPath[PATH_MAX] = { 0x00 }; in GetAsMapping() local 56 if (!RealPath(fileName, realPath)) { in GetAsMapping() 59 std::FILE* fp = std::fopen(realPath, "r"); in GetAsMapping() 105 char realPath[PATH_MAX] = { 0x00 }; in GetAssetPath() local 106 if (!RealPath(fileName, realPath)) { in GetAssetPath() 109 std::FILE* fp = std::fopen(realPath, "r"); in GetAssetPath()
|
/foundation/filemanagement/storage_service/services/storage_daemon/utils/test/common/ |
H A D | help_utils.cpp | 92 std::string realPath(path); in CheckUserDir() 93 realPath.replace(realPath.find("%s"), strlen("%s"), "el1"); in CheckUserDir() 94 if (CheckDir(realPath) == false) { in CheckUserDir() 99 std::string realPath(path); in CheckUserDir() 100 realPath.replace(realPath.find("%s"), strlen("%s"), "el2"); in CheckUserDir() 101 if (CheckDir(realPath) == false) { in CheckUserDir()
|
/foundation/filemanagement/storage_service/services/storage_daemon/libfscrypt/src/ |
H A D | key_control.c | 85 char *realPath = realpath(mnt, NULL); in FsIoctl() local 86 if (realPath == NULL) { in FsIoctl() 91 int fd = open(realPath, O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); in FsIoctl() 92 free(realPath); in FsIoctl() 147 char *realPath = realpath(mnt, NULL); in CheckKernelFscrypt() local 148 if (realPath == NULL) { in CheckKernelFscrypt() 153 int fd = open(realPath, O_RDONLY | O_DIRECTORY | O_CLOEXEC); in CheckKernelFscrypt() 154 free(realPath); in CheckKernelFscrypt()
|
/foundation/multimedia/image_framework/frameworks/innerkitsimpl/stream/src/ |
H A D | file_packer_stream.cpp | 45 std::string realPath; in FilePackerStream() local 46 if (!ImageUtils::PathToRealPath(dirPath, realPath)) { in FilePackerStream() 52 if (!ForceCreateDirectory(realPath)) { in FilePackerStream() 58 std::string fullPath = realPath + "/" + fileName; in FilePackerStream()
|
/foundation/bundlemanager/bundle_framework/test/fuzztest/fuzztest_application/bundlefileutil_fuzzer/ |
H A D | bundlefileutil_fuzzer.cpp | 29 std::string realPath (reinterpret_cast<const char*>(data), size); in DoSomethingInterestingWithMyAPI() 33 realPaths.push_back(realPath); in DoSomethingInterestingWithMyAPI() 34 fileUtil.CheckFilePath(bundlePath, realPath); in DoSomethingInterestingWithMyAPI()
|
/foundation/multimedia/image_framework/plugins/manager/src/common/ |
H A D | platform_adp.cpp | 80 string realPath; in CheckAndNormalizePath() local 81 if (!PathToRealPath(path, realPath)) { in CheckAndNormalizePath() 86 path = std::move(realPath); in CheckAndNormalizePath()
|
/foundation/distributeddatamgr/pasteboard/framework/uri/ |
H A D | uri_handler.cpp | 22 char realPath[PATH_MAX + 1] = { 0x00 };
in GetRealPath() local 23 if (inOriPath.size() > PATH_MAX || realpath(inOriPath.c_str(), realPath) == nullptr) {
in GetRealPath() 27 outRealPath = std::string(realPath);
in GetRealPath()
|
/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/medialib_statistic_test/src/ |
H A D | media_space_statistics_test.cpp | 548 const string realPath = "/storage/cloud/100/files/Pictures/MediaSpaceStatistics_test_007.jpg"; in HWTEST_F() local 552 int32_t ret = mediaLibraryManager->GetUriFromFilePath(realPath, fileUri, userId); in HWTEST_F() 577 const string realPath = "/storage/cloud/100/files/Docs/Documents/MediaSpaceStatistics_test_008.txt"; in HWTEST_F() local 581 mediaLibraryManager->GetUriFromFilePath(realPath, fileUri, userId); in HWTEST_F() 586 EXPECT_EQ(filePath, realPath); in HWTEST_F() 608 const string realPath = "/storage/cloud/100/files/Docs/Download/MediaSpaceStatistics_test_009.txt"; in HWTEST_F() local 612 mediaLibraryManager->GetUriFromFilePath(realPath, fileUri, userId); in HWTEST_F() 618 EXPECT_EQ(filePath, realPath); in HWTEST_F() 635 const string realPath = "/storage/cloud/100/files/Docs/Documents/MediaSpaceStatistics_test_010.txt"; in HWTEST_F() local 639 int32_t ret = mediaLibraryManager->GetUriFromFilePath(realPath, fileUr in HWTEST_F() 664 const string realPath = "/storage/cloud/100/files/Docs/Documents/test1/MediaSpaceStatistics_test_011.txt"; HWTEST_F() local 695 const string realPath = "/storage/cloud/100/files/Docs/Documents/weixin/test.txt"; HWTEST_F() local 726 const string realPath = "/storage/cloud/100/files/Docs/Download/weixin/MediaSpaceStatistics_test_013.mp3"; HWTEST_F() local 757 const string realPath = "/storage/cloud/100/files/Camera/weixin/MediaSpaceStatistics_test_014.jpg"; HWTEST_F() local 786 const string realPath = "/storage/cloud/100/files/Docs/Download/weixin/MediaSpaceStatistics_test_015.jpg"; HWTEST_F() local 817 const string realPath = "/storage/cloud/100/files/Docs/Download/weixin/MediaSpaceStatistics_test_016.xxx"; HWTEST_F() local 848 const string realPath = "/storage/cloud/100/files/Videos/MediaSpaceStatistics_test_017.mp4"; HWTEST_F() local 877 const string realPath = "/storage/cloud/100/files/Audios/MediaSpaceStatistics_test_018.mp3"; HWTEST_F() local [all...] |
/foundation/bundlemanager/bundle_framework/services/bundlemgr/src/verify/ |
H A D | verify_manager_host_impl.cpp | 216 std::string realPath = GetRealPath(bundleName, userId, abcPaths[i]); in CopyFilesToTempDir() local 217 if (realPath.empty()) { in CopyFilesToTempDir() 222 APP_LOGD("realPath is %{public}s", realPath.c_str()); in CopyFilesToTempDir() 225 APP_LOGE("GetFileDir failed %{public}s", realPath.c_str()); in CopyFilesToTempDir() 235 result = InstalldClient::GetInstance()->CopyFile(realPath, tempCopyPath, ""); in CopyFilesToTempDir() 237 APP_LOGE("CopyFile tempDir %{public}s faild %{public}d", realPath.c_str(), result); in CopyFilesToTempDir() 523 std::string realPath; in DeleteAbc() local 524 realPath.append(Constants::BUNDLE_CODE_DIR).append(ServiceConstants::PATH_SEPARATOR) in DeleteAbc() 528 auto result = InstalldClient::GetInstance()->IsExistFile(realPath, isExis in DeleteAbc() [all...] |