/ohos5.0/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() 74 string realPath; in ScanFileSync() local 75 if (!PathToRealPath(path, realPath)) { in ScanFileSync() 100 string realPath; in ScanFileSyncWithoutAlbumUpdate() local 101 if (!PathToRealPath(path, realPath)) { in ScanFileSyncWithoutAlbumUpdate() 126 string realPath; in ScanDir() local 127 if (!PathToRealPath(path, realPath)) { in ScanDir() 149 string realPath; in ScanDirSync() local [all …]
|
/ohos5.0/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() 72 std::string realPath; in ScanFileSync() local 73 if (!PathToRealPath(path, realPath)) { in ScanFileSync() 97 std::string realPath; in ScanDir() local 98 if (!PathToRealPath(path, realPath)) { in ScanDir() 103 if (!RingtoneScannerUtils::IsDirectory(realPath)) { in ScanDir() 120 std::string realPath; in ScanDirSync() local 121 if (!PathToRealPath(path, realPath)) { in ScanDirSync() [all …]
|
/ohos5.0/base/update/updater/interfaces/kits/misc_info/ |
H A D | misc_info.cpp | 27 if (realPath == nullptr) { in WriteUpdaterMessage() 31 FILE* fp = fopen(realPath, "rb+"); in WriteUpdaterMessage() 32 free(realPath); in WriteUpdaterMessage() 59 if (realPath == nullptr) { in ReadUpdaterMessage() 63 FILE* fp = fopen(realPath, "rb"); in ReadUpdaterMessage() 64 free(realPath); in ReadUpdaterMessage() 120 if (realPath == nullptr) { in WriteUpdaterParaMisc() 125 free(realPath); in WriteUpdaterParaMisc() 162 if (realPath == nullptr) { in ReadUpdaterParaMisc() 166 FILE *fp = fopen(realPath, "rb"); in ReadUpdaterParaMisc() [all …]
|
/ohos5.0/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()
|
/ohos5.0/foundation/filemanagement/app_file_service/test/unittest/js_file_uri_test/ |
H A D | FileUri.test.js | 83 let realPath = fileUriObject.path; 84 console.info(`getPathFromUri success: ${JSON.stringify(realPath)}`); 85 expect(resultPath == realPath).assertTrue(); 105 let realPath = fileUriObject.path; 106 console.info(`getPathFromUri success: ${JSON.stringify(realPath)}`); 107 expect(resultPath == realPath).assertTrue(); 128 let realPath = fileUriObject.path; 129 console.info(`getPathFromUri success: ${JSON.stringify(realPath)}`); 130 expect(resultPath == realPath).assertTrue(); 134 let realPath = fileUriObject.path; [all …]
|
/ohos5.0/foundation/bundlemanager/bundle_framework/common/utils/src/ |
H A D | bundle_file_util.cpp | 63 if (!PathToRealPath(bundlePath, realPath)) { in CheckFilePath() 67 if (access(realPath.c_str(), F_OK) != 0) { in CheckFilePath() 71 if (!CheckFileSize(realPath, MAX_HAP_SIZE)) { in CheckFilePath() 93 std::string realPath = ""; in CheckFilePath() local 97 realPaths.emplace_back(realPath); in CheckFilePath() 108 std::string realPath = ""; in CheckFilePath() local 109 if (!CheckFilePath(bundlePath, realPath)) { in CheckFilePath() 112 realPaths.emplace_back(realPath); in CheckFilePath() 186 std::string realPath = ""; in GetHapFilesFromBundlePath() local 187 if (!CheckFilePath(hapFilePath, realPath)) { in GetHapFilesFromBundlePath() [all …]
|
/ohos5.0/foundation/resourceschedule/resource_schedule_service/cgroup_sched/framework/process_group/src/ |
H A D | process_group_util.cpp | 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() 156 if (access(realPath.c_str(), W_OK)) { 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() 153 __func__, realPath.c_str(), fd); 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() 175 __func__, realPath.c_str(), fd); in AddThreadGroupSchedPolicy()
|
/ohos5.0/foundation/multimodalinput/input/util/common/src/ |
H A D | util.cpp | 301 char realPath[PATH_MAX] = {}; in ReadProFile() local 307 if (!IsFileExists(realPath)) { in ReadProFile() 334 std::ifstream reader(realPath); in ReadProConfigFile() 384 char realPath[PATH_MAX] = {}; in ReadJsonFile() local 394 if (!IsFileExists(realPath)) { in ReadJsonFile() 481 char realPath[PATH_MAX] = {}; in ReadTomlFile() local 487 if (!IsFileExists(realPath)) { in ReadTomlFile() 518 char realPath[PATH_MAX] = {}; in ReadCursorStyleFile() local 551 char realPath[PATH_MAX] = {}; in FileVerification() local 553 if (!IsFileExists(realPath)) { in FileVerification() [all …]
|
/ohos5.0/base/update/sys_installer/services/module_update/src/ |
H A D | module_loop.cpp | 147 string realPath = GetRealPath(sysfsDevice); in ConfigureReadAhead() local 148 if (realPath.empty()) { in ConfigureReadAhead() 154 if (stat(realPath.c_str(), &fileState) != 0) { in ConfigureReadAhead() 159 (void)chmod(realPath.c_str(), fileState.st_mode); in ConfigureReadAhead() 164 if (chmod(realPath.c_str(), 0644) != 0) { in ConfigureReadAhead() 175 LOG(ERROR) << "Failed to write to " << realPath; in ConfigureReadAhead() 242 string realPath = GetRealPath(target); in SetUpLoopDevice() local 243 if (realPath.empty()) { in SetUpLoopDevice() 251 if (statfs(realPath.c_str(), &stbuf) != 0 || in SetUpLoopDevice() 292 string realPath = GetRealPath(device); in WaitForDevice() local [all …]
|
/ohos5.0/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() 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() 117 dlHandle = dlopen(realPath.c_str(), RTLD_NOW | RTLD_LOCAL); in LoadGl() 121 if (!PathToRealPath(path, realPath) || in LoadGl() [all …]
|
/ohos5.0/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 113 return realPath; in GetRealPathBySA() 115 realPath = PATH_SHARE + MODE_R + bundleName + sandboxPath; in GetRealPathBySA() [all …]
|
/ohos5.0/base/startup/init/services/modules/reboot/ |
H A D | reboot_misc.c | 37 char *realPath = GetRealPath(path); in RBMiscWriteUpdaterMessage() local 38 BEGET_CHECK_RETURN_VALUE(realPath != NULL, -1); in RBMiscWriteUpdaterMessage() 40 FILE *fp = fopen(realPath, "rb+"); in RBMiscWriteUpdaterMessage() 41 free(realPath); in RBMiscWriteUpdaterMessage() 42 realPath = NULL; in RBMiscWriteUpdaterMessage() 56 char *realPath = GetRealPath(path); in RBMiscReadUpdaterMessage() local 57 if (realPath != NULL) { in RBMiscReadUpdaterMessage() 58 fp = fopen(realPath, "rb"); in RBMiscReadUpdaterMessage() 59 free(realPath); in RBMiscReadUpdaterMessage() 60 realPath = NULL; in RBMiscReadUpdaterMessage()
|
/ohos5.0/base/startup/appspawn/modules/common/ |
H A D | appspawn_begetctl.c | 44 char *realPath = realpath(ptyName, NULL); in RunAppSandbox() local 45 if (realPath == NULL) { in RunAppSandbox() 49 APPSPAWN_CHECK(realPath != NULL, _exit(1), "Failed get realpath, err=%{public}d", errno); in RunAppSandbox() 50 int n = strncmp(realPath, "/dev/pts/", strlen("/dev/pts/")); in RunAppSandbox() 51 APPSPAWN_CHECK(n == 0, free(realPath); _exit(1), "pts path %{public}s is invaild", realPath); in RunAppSandbox() 52 int fd = open(realPath, O_RDWR); in RunAppSandbox() 53 free(realPath); in RunAppSandbox()
|
/ohos5.0/base/security/dlp_permission_service/services/dlp_permission/sa/adapt/ |
H A D | file_operator.cpp | 50 char realPath[PATH_MAX] = {0}; in InputFileByPathAndContent() local 51 (void)realpath(str.c_str(), realPath); in InputFileByPathAndContent() 53 if (str.compare(realPath) != 0) { in InputFileByPathAndContent() 54 …FO(LABEL, "path need to be canonical, str %{public}s realPath %{public}s.", str.c_str(), realPath); in InputFileByPathAndContent() 91 char realPath[PATH_MAX] = {0}; in GetFileContentByPath() local 92 if ((realpath(path.c_str(), realPath) == nullptr) && (errno != ENOENT)) { in GetFileContentByPath() 96 if (!IsExistFile(realPath)) { in GetFileContentByPath() 97 DLP_LOG_INFO(LABEL, "cannot find file, path = %{public}s", realPath); in GetFileContentByPath() 101 std::ifstream i(realPath); in GetFileContentByPath() 103 DLP_LOG_INFO(LABEL, "cannot open file %{public}s, errno %{public}d.", realPath, errno); in GetFileContentByPath()
|
/ohos5.0/base/security/code_signature/test/unittest/ |
H A D | local_code_sign_utils_test.cpp | 57 std::string realPath; variable 59 bool bRet = OHOS::PathToRealPath(DEMO_AN_PATH2, realPath); 61 bRet = FsverityUtilsHelper::GetInstance().GenerateFormattedDigest(realPath.c_str(), digest); 79 std::string realPath; variable 81 bool bRet = OHOS::PathToRealPath(DEMO_AN_PATH2, realPath); 83 bRet = FsverityUtilsHelper::GetInstance().GenerateFormattedDigest(realPath.c_str(), digest); 101 std::string realPath = DEMO_AN_PATH2 + "invalid"; variable 102 … bool bRet = FsverityUtilsHelper::GetInstance().GenerateFormattedDigest(realPath.c_str(), digest);
|
/ohos5.0/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); variable 152 EXPECT_EQ(realPath, ""); 154 realPath = SoftBusSessionListener::GetRealPath(testUri2); 155 EXPECT_EQ(realPath, ""); 157 realPath = SoftBusSessionListener::GetRealPath(testUri3); 158 EXPECT_EQ(realPath, TEST_PATH); 161 realPath = SoftBusSessionListener::GetRealPath(testUri4); 162 EXPECT_EQ(realPath, ""); 165 realPath = SoftBusSessionListener::GetRealPath(testUri5); 166 EXPECT_EQ(realPath, "");
|
/ohos5.0/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/medialib_statistic_test/src/ |
H A D | media_space_statistics_test.cpp | 580 mediaLibraryManager->GetUriFromFilePath(realPath, fileUri, userId); 585 EXPECT_EQ(filePath, realPath); 611 mediaLibraryManager->GetUriFromFilePath(realPath, fileUri, userId); 617 EXPECT_EQ(filePath, realPath); 667 mediaLibraryManager->GetUriFromFilePath(realPath, fileUri, userId); 673 EXPECT_EQ(filePath, realPath); 698 mediaLibraryManager->GetUriFromFilePath(realPath, fileUri, userId); 704 EXPECT_EQ(filePath, realPath); 735 EXPECT_EQ(filePath, realPath); 795 EXPECT_EQ(filePath, realPath); [all …]
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/render_service_profiler/ |
H A D | rs_profiler_utils.cpp | 244 std::string realPath; in GetRealPath() local 245 if (!PathToRealPath(path, realPath)) { in GetRealPath() 249 return realPath; in GetRealPath() 303 if (realPath.empty()) { in IterateDirectory() 342 if (realPath.empty()) { in LoadLine() 346 std::ifstream file(realPath); in LoadLine() 357 if (realPath.empty()) { in LoadLines() 361 std::ifstream file(realPath); in LoadLines() 375 if (realPath.empty()) { in LoadContent() 379 std::ifstream file(realPath); in LoadContent() [all …]
|
/ohos5.0/foundation/distributeddatamgr/preferences/frameworks/native/src/ |
H A D | preferences_helper.cpp | 154 std::string realPath = GetRealPath(options.filePath, errCode); in GetPreferences() local 155 if (realPath == "" || errCode != E_OK) { in GetPreferences() 160 auto it = prefsCache_.find(realPath); in GetPreferences() 171 const_cast<Options &>(options).filePath = realPath; in GetPreferences() 191 prefsCache_.insert({realPath, {pref, isEnhancePreferences}}); in GetPreferences() 198 std::string realPath = GetRealPath(path, errCode); in DeletePreferences() local 199 if (realPath == "" || errCode != E_OK) { in DeletePreferences() 226 std::string filePath = realPath.c_str(); in DeletePreferences() 252 std::string realPath = GetRealPath(path, errCode); in RemovePreferencesFromCache() local 253 if (realPath == "" || errCode != E_OK) { in RemovePreferencesFromCache() [all …]
|
/ohos5.0/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()
|
/ohos5.0/base/security/security_guard/services/security_collector/src/ |
H A D | lib_loader.cpp | 38 std::string realPath; in LoadLib() local 39 if (!PathToRealPath(m_libPath, realPath) || realPath.find("/system/lib") != 0) { in LoadLib() 40 LOGE("LoadLib m_libPath error, realPath: %{public}s", realPath.c_str()); in LoadLib() 44 m_handle = dlopen(realPath.c_str(), RTLD_LAZY); in LoadLib()
|
/ohos5.0/foundation/filemanagement/app_file_service/interfaces/common/src/ |
H A D | common_func.cpp | 88 string realPath = path; in GetUriFromPath() local 89 NormalizePath(realPath); in GetUriFromPath() 92 realPath = FILE_SCHEME_PREFIX + packageName + SandboxHelper::Encode(realPath); in GetUriFromPath() 93 return realPath; in GetUriFromPath()
|
/ohos5.0/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()
|
/ohos5.0/base/update/updater/services/applypatch/ |
H A D | partition_record.cpp | 35 char *realPath = realpath(miscBlockDevice.c_str(), NULL); in IsPartitionUpdated() local 36 if (realPath == nullptr) { in IsPartitionUpdated() 40 int fd = open(realPath, O_RDONLY | O_EXCL | O_CLOEXEC | O_BINARY); in IsPartitionUpdated() 41 free(realPath); in IsPartitionUpdated() 119 char *realPath = realpath(miscBlockDevice.c_str(), NULL); in RecordPartitionUpdateStatus() local 120 if (realPath == nullptr) { in RecordPartitionUpdateStatus() 124 int fd = open(realPath, O_RDWR | O_EXCL | O_CLOEXEC | O_BINARY); in RecordPartitionUpdateStatus() 125 free(realPath); in RecordPartitionUpdateStatus()
|