/ohos5.0/base/security/code_signature/test/unittest/ |
H A D | enable_verity_test.cpp | 273 int fd = open(filePath.c_str(), O_RDONLY); in EnableVerityOnOneFile() 291 EXPECT_EQ(ExpandFile(filePath, filePath + ".tree", in MakeExpandTreeFile() 308 size_t fileSize = GetFileSize(filePath); in FillCommonArgs() 336 FillOptional(filePath, &arg, rootHash); in EnableExpandedTamperFile() 390 std::string filePath = TEST_DEFAULT_FILE; variable 471 FillOptional(filePath, &arg, rootHash); 499 FillOptional(filePath, &arg, rootHash); 541 FillOptional(filePath, &arg, rootHash); 574 FillOptional(filePath, &arg, rootHash); 605 FillOptional(filePath, &arg, rootHash); [all …]
|
/ohos5.0/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/medialibrary_multistages_capture_test/src/ |
H A D | medialibrary_multistages_video_capture_test.cpp | 58 return filePath.substr(0, filePath.rfind('.')) + "_tmp" + filePath.substr(filePath.rfind('.')); in GetTempFilePath() 237 PrepareBaseVideoFile(filePath); 269 PrepareBaseVideoFile(filePath); 335 PrepareBaseVideoFile(filePath); 336 PrepareTempVideoFile(filePath); 364 PrepareBaseVideoFile(filePath); 373 PrepareTempVideoFile(filePath); 402 PrepareBaseVideoFile(filePath); 403 PrepareTempVideoFile(filePath); 436 PrepareBaseVideoFile(filePath); [all …]
|
/ohos5.0/foundation/multimedia/ringtone_library/test/unittest/ringtone_utils_test/src/ |
H A D | ringtone_file_utils_test.cpp | 80 string filePath = string(count, 'a') + ".ogg"; variable 83 filePath = "ringtoneFileUtils_OpenFile_Test_001.ogg"; 84 ret = RingtoneFileUtils::OpenFile(filePath, "z"); 124 string filePath = DEFAULT_STR; variable 127 filePath = "/data/local/tmp/test/createfile_002.com"; 149 filePath = "/"; 152 filePath = ""; 159 string filePath = "data/createfile_001."; variable 162 filePath = "createfile_001./"; 229 const string filePath("a", 5200); variable [all …]
|
/ohos5.0/base/global/i18n/frameworks/intl/test/unittest/mock/src/ |
H A D | generate_ics_file.cpp | 35 std::ofstream fstream(filePath); in GenerateFile() 38 return filePath; in GenerateFile() 70 return filePath; in GenerateFile() 76 std::ofstream fstream(filePath); in WriteVersionFile() 79 return filePath; in WriteVersionFile() 84 return filePath; in WriteVersionFile() 90 std::ofstream fstream(filePath); in WriteManifest() 93 return filePath; in WriteManifest() 99 return filePath; in WriteManifest() 108 return filePath; in WriteBinaryFile() [all …]
|
/ohos5.0/foundation/multimedia/media_foundation/test/scenetest/ |
H A D | test_single_audio_recorder_fast_audio_function.h | 114 CheckAudio(filePath, recordSource); in FIXTURE() 134 CheckAudio(filePath, recordSource); in FIXTURE() 155 CheckAudio(filePath, recordSource); in FIXTURE() 176 CheckAudio(filePath, recordSource); in FIXTURE() 197 CheckAudio(filePath, recordSource); in FIXTURE() 219 CheckAudio(filePath, recordSource); in FIXTURE() 242 CheckAudio(filePath, recordSource); in FIXTURE() 271 CheckAudio(filePath, recordSource); in FIXTURE() 298 CheckAudio(filePath, recordSource); in FIXTURE() 324 CheckAudio(filePath, recordSource); in FIXTURE() [all …]
|
H A D | test_single_audio_recorder_fast_prepare.h | 70 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local 86 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local 104 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local 129 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local 156 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local 184 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local 210 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local 251 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local 282 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local 299 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local [all …]
|
H A D | test_single_audio_recorder_fast_start_pause.h | 63 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local 81 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local 101 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local 122 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local 142 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local 162 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local 201 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local 230 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local 248 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local 267 std::string filePath = std::string(recorder->GetOutputDir() + "/test.m4a"); in FIXTURE() local [all …]
|
/ohos5.0/base/customization/config_policy/test/unittest/ |
H A D | config_policy_utils_test.cpp | 50 char *filePath = nullptr; in TestGetCfgFile() local 52 filePath = cfgFiles->paths[i]; in TestGetCfgFile() 53 if (filePath && *filePath != '\0') { in TestGetCfgFile() 61 if (filePath && *filePath != '\0') { in TestGetCfgFile() 128 char *filePath = cfgDir->paths[i]; variable 129 if (filePath && *filePath != '\0') { 130 std::cout << "filePath: " << filePath << std::endl; 221 char *filePath = nullptr; variable 223 EXPECT_TRUE(filePath == nullptr); 225 EXPECT_TRUE(filePath == nullptr); [all …]
|
/ohos5.0/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/app/src/security/ |
H A D | security.cpp | 67 if (filePath.empty()) { in SetSecurityOption() 72 stat(filePath.c_str(), &curStat); in SetSecurityOption() 74 return SetDirSecurityOption(filePath, option); in SetSecurityOption() 82 if (filePath.empty()) { in GetSecurityOption() 87 stat(filePath.c_str(), &curStat); in GetSecurityOption() 89 return GetDirSecurityOption(filePath, option); in GetSecurityOption() 210 if (!IsExits(filePath)) { in SetFileSecurityOption() 231 dataLevel.c_str(), filePath.c_str()); in SetFileSecurityOption() 241 (void)filePath; in SetDirSecurityOption() 248 if (!IsExits(filePath)) { in GetFileSecurityOption() [all …]
|
/ohos5.0/foundation/filemanagement/app_file_service/tests/unittests/backup_utils/b_json/ |
H A D | b_json_cached_entity_test.cpp | 53 std::string filePath = path + ".json"; variable 78 std::string filePath = path + ""; variable 103 std::string filePath = path + ".json"; variable 128 std::string filePath = path + ".json"; variable 153 std::string filePath = path + ""; variable 178 std::string filePath = path + ""; variable 203 std::string filePath = path + ""; variable 228 std::string filePath = path + ".json"; variable 254 std::string filePath = path + ".json"; variable 280 std::string filePath = path + ".json"; variable [all …]
|
H A D | b_json_service_disposal_config_test.cpp | 71 string filePath = PATH + CONFIG_NAME; variable 72 ofstream outFile(filePath); 96 string filePath = PATH + CONFIG_NAME; variable 119 string filePath = PATH + CONFIG_NAME; variable 145 string filePath = PATH + CONFIG_NAME; variable 173 string filePath = PATH + CONFIG_NAME; variable 201 string filePath = PATH + CONFIG_NAME; variable 231 string filePath = PATH + CONFIG_NAME; variable 259 string filePath = PATH + CONFIG_NAME; variable 289 string filePath = PATH + CONFIG_NAME; variable [all …]
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/moduletest/src/ |
H A D | distributeddb_kv_backup_test.cpp | 236 filePath = exportPath + "/bkpDB2.bin"; 298 filePath = exportPath + "/bkpDB1.bin"; 500 filePath = exportPath + "/bkpDB2.bin"; 511 filePath = exportPath + "/bkpDB3.bin"; 522 filePath = exportPath + "/bkpDB4.bin"; 569 filePath = importPath + "/bkpDB2.bin"; 623 filePath = importPath2 + "/bkpDB1.bin"; 653 filePath = importPath + "/a.txt"; 654 ofstream createFile(filePath); 665 filePath = importPath + "/bkpDB.bin"; [all …]
|
/ohos5.0/foundation/arkui/ui_lite/test/autotest/src/ |
H A D | compare_tools.cpp | 209 uint32_t fd = open(filePath, O_RDONLY | O_BINARY); in CompareFile() 211 uint32_t fd = open(filePath, O_RDONLY); in CompareFile() 219 GRAPHIC_LOGI("[COMPARE_SUCCESS]:fileName=%s", filePath); in CompareFile() 228 GRAPHIC_LOGI("[COMPARE_FAILURE]:fileName=%s", filePath); in CompareFile() 271 if (filePath == nullptr || buff == nullptr || bufSize <= 0) { in SaveResultLog() 275 SaveLog(buff, bufSize, filePath); in SaveResultLog() 278 bool CompareTools::SaveFile(const char* filePath, size_t length) in SaveFile() argument 301 uint32_t fd = open(filePath, O_RDONLY); in CheckFileExist() 309 void CompareTools::SetLogPath(const char* filePath, size_t length) in SetLogPath() argument 316 if (memcpy_s(logPath_, length, filePath, length) != EOK) { in SetLogPath() [all …]
|
/ohos5.0/foundation/arkui/ace_engine/adapter/ohos/entrance/pa_engine/engine/common/ |
H A D | js_backend_asset_manager.cpp | 47 filePath = fileUri.substr(0, slashPos + 1); in GetFileInfo() 50 if (Framework::StartWith(filePath, SLASHSTR)) { in GetFileInfo() 51 filePath = filePath.substr(1); in GetFileInfo() 62 std::string filePath; in ParseWorkerUri() local 63 GetFileInfo(fileUri, fileName, filePath); in ParseWorkerUri() 65 filePath = filePath.substr(3); // 3 : offset of filePath in ParseWorkerUri() 68 assetManager_->GetAssetList(filePath, files); in ParseWorkerUri() 91 std::string filePath; in ParseFileUri() local 92 GetFileInfo(fileUri, fileName, filePath); in ParseFileUri() 94 assetManager_->GetAssetList(filePath, files); in ParseFileUri() [all …]
|
/ohos5.0/foundation/filemanagement/app_file_service/tests/unittests/backup_utils/b_filesystem/ |
H A D | b_file_test.cpp | 46 string filePath = path + "temp.txt"; in GetTestFile() local 51 return {filePath, content}; in GetTestFile() 68 const auto [filePath, content] = GetTestFile(tm); 94 const auto [filePath, content] = GetTestFile(tm); 122 const auto [filePath, content] = GetTestFile(tm); 125 auto ret = BFile::CopyFile(filePath, fileInPath); 128 ret = BFile::CopyFile(filePath, filePath); 151 const auto [filePath, content] = GetTestFile(tm); 154 auto ret = BFile::MoveFile(filePath, fileInPath); 157 ret = BFile::MoveFile(filePath, filePath); [all …]
|
/ohos5.0/foundation/filemanagement/app_file_service/utils/src/b_json/ |
H A D | b_json_service_disposal_config.cpp | 34 string filePath = PATH_BUNDLE_BACKUP_HOME + CONFIG_NAME; in BJsonDisposalConfig() local 35 if (access(filePath.c_str(), F_OK) == 0) { in BJsonDisposalConfig() 64 ofstream outFile(filePath); in BJsonDisposalConfig() 81 ifstream inFile(filePath); in AppendIntoDisposalConfigFile() 116 ofstream outFile(filePath); in AppendIntoDisposalConfigFile() 135 ifstream input(filePath); in DeleteFromDisposalConfigFile() 170 ofstream output(filePath); in DeleteFromDisposalConfigFile() 189 ifstream inFile(filePath); in IfBundleNameInDisposalConfigFile() 234 ifstream inFile(filePath); in GetBundleNameFromConfigFile() 268 if (access(filePath.c_str(), F_OK) != 0) { in DeleteConfigFile() [all …]
|
H A D | b_json_clear_data_config.cpp | 38 if (access(filePath.c_str(), F_OK) == 0) { in BJsonClearDataConfig() 67 ofstream outFile(filePath); in BJsonClearDataConfig() 85 ifstream inFile(filePath); in HasClearBundleRecord() 116 ifstream inFile(filePath); in FindClearBundleRecord() 155 ifstream inFile(filePath); in InsertClearBundleRecord() 203 ifstream input(filePath); in DeleteClearBundleRecord() 238 ofstream output(filePath); in DeleteClearBundleRecord() 258 ifstream inFile(filePath); in GetAllClearBundleRecords() 296 if (remove(filePath.c_str()) != 0) { in DeleteConfigFile() 307 ifstream inFile(filePath); in WriteClearBundleRecord() [all …]
|
/ohos5.0/commonlibrary/c_utils/base/src/ |
H A D | file_ex.cpp | 38 std::string tmpPath(filePath); in RustLoadStringFromFile() 59 std::string tmpPath(filePath); in RustLoadBufferFromFile() 70 std::string tmpPath(filePath); in RustSaveBufferToFile() 77 std::string tmpPath(filePath); in RustSaveStringToFile() 112 ifstream file(filePath.c_str()); in LoadStringFromFile() 214 file.open(filePath.c_str(), ios::out | ios::app); in SaveStringToFile() 225 filePath.c_str(), content.c_str()); in SaveStringToFile() 261 if (!PathToRealPath(filePath, realPath)) { in LoadBufferFromNodeFile() 297 file.open(filePath.c_str(), ios::in | ios::binary); in LoadBufferFromFile() 312 return LoadBufferFromNodeFile(filePath, content); in LoadBufferFromFile() [all …]
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/gaussdb_rd/src/common/src/ |
H A D | os_api.cpp | 31 bool CheckPathPermission(const std::string &filePath) in CheckPathPermission() argument 33 return (access(filePath.c_str(), R_OK) == 0) && (access(filePath.c_str(), W_OK) == 0); in CheckPathPermission() 36 bool IsPathExist(const std::string &filePath) in IsPathExist() argument 38 return (access(filePath.c_str(), ACCESS_MODE_EXISTENCE) == 0); in IsPathExist() 75 void SplitFilePath(const std::string &filePath, std::string &fieldir, std::string &fileName) in SplitFilePath() argument 77 if (filePath.empty()) { in SplitFilePath() 81 auto slashPos = filePath.find_last_of('/'); in SplitFilePath() 83 fileName = filePath; in SplitFilePath() 88 fieldir = filePath.substr(0, slashPos); in SplitFilePath() 89 fileName = filePath.substr(slashPos + 1); in SplitFilePath()
|
/ohos5.0/base/sensors/miscdevice/utils/common/src/ |
H A D | file_utils.cpp | 38 std::string ReadJsonFile(const std::string &filePath) in ReadJsonFile() argument 40 if (filePath.empty()) { in ReadJsonFile() 78 int32_t GetFileSize(const std::string &filePath) in GetFileSize() argument 81 if (stat(filePath.c_str(), &statbuf) != 0) { in GetFileSize() 109 char filePath[FILE_PATH_MAX] = {'\0'}; in GetFileName() local 123 fileName = filePath; in GetFileName() 157 bool CheckFileSize(const std::string &filePath) in CheckFileSize() argument 159 int32_t fileSize = GetFileSize(filePath); in CheckFileSize() 174 return (filePath.substr(pos + 1, filePath.npos) == checkExtension); in CheckFileExtendName() 224 char filePath[FILE_PATH_MAX + 1] = { '\0' }; in GetFileSuffix() local [all …]
|
/ohos5.0/foundation/resourceschedule/device_standby/utils/policy/src/ |
H A D | json_utils.cpp | 54 if (!GetFileContent(filePath, content)) { in LoadJsonValueFromFile() 59 STANDBYSERVICE_LOGE("content of %{public}s is empty", filePath.c_str()); in LoadJsonValueFromFile() 76 if (!CreateNodeFile(filePath)) { in DumpJsonValueToFile() 82 if (!GetRealPath(filePath, realPath)) { in DumpJsonValueToFile() 88 STANDBYSERVICE_LOGE("open file: %{public}s failed.", filePath.c_str()); in DumpJsonValueToFile() 96 bool JsonUtils::CreateNodeFile(const std::string &filePath) in CreateNodeFile() argument 98 if (access(filePath.c_str(), F_OK) == ERR_OK) { in CreateNodeFile() 103 if (!GetRealPath(filePath, fullpath)) { in CreateNodeFile() 105 fullpath = filePath; in CreateNodeFile() 193 bool JsonUtils::GetFileContent(const std::string& filePath, std::string& content) in GetFileContent() argument [all …]
|
/ohos5.0/base/security/huks/test/unittest/huks_common_test/src/ |
H A D | hks_test_file_operator_func.c | 60 char filePath[PATH_MAX + 1] = {0}; in FileRead() local 61 (void)realpath(fileName, filePath); in FileRead() 62 if (strstr(filePath, "../") != NULL) { in FileRead() 63 HKS_TEST_LOG_E("invalid filePath, path %s", filePath); in FileRead() 67 FILE *fp = fopen(filePath, "rb"); in FileRead() 105 char filePath[PATH_MAX + 1] = {0}; in FileWrite() local 106 if (memcpy_s(filePath, sizeof(filePath) - 1, fileName, strlen(fileName)) != EOK) { in FileWrite() 109 (void)realpath(fileName, filePath); in FileWrite() 110 if (strstr(filePath, "../") != NULL) { in FileWrite() 116 FILE *fp = fopen(filePath, "wb+"); in FileWrite() [all …]
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/kvdb/src/ |
H A D | process_system_api_adapter_impl.cpp | 50 …piAdapterImpl::DBStatus ProcessSystemApiAdapterImpl::SetSecurityOption(const std::string &filePath, in SetSecurityOption() argument 53 …if (filePath.empty() || option.securityLabel < Label::NOT_SET || option.securityLabel > Label::S4)… in SetSecurityOption() 58 stat(filePath.c_str(), &curStat); in SetSecurityOption() 63 if (access(filePath.c_str(), F_OK) != 0) { in SetSecurityOption() 72 bool result = SecurityLabel::SetSecurityLabel(filePath, secLevel); in SetSecurityOption() 74 auto fPath = filePath.substr(0, HEAD_SIZE) + REPLACE_CHAIN + in SetSecurityOption() 75 filePath.substr(filePath.length() - END_SIZE, END_SIZE); in SetSecurityOption() 85 if (filePath.empty()) { in GetSecurityOption() 90 stat(filePath.c_str(), &curStat); in GetSecurityOption() 95 if (access(filePath.c_str(), F_OK) != 0) { in GetSecurityOption() [all …]
|
/ohos5.0/foundation/ability/ability_runtime/services/abilitymgr/src/ |
H A D | mission_data_storage.cpp | 177 filePath = filePath + UNDERLINE_SEPARATOR + LOW_RESOLUTION_FLAG; in GetMissionSnapshotPath() 179 filePath = filePath + JPEG_FILE_SUFFIX; in GetMissionSnapshotPath() 180 return filePath; in GetMissionSnapshotPath() 248 WriteToJpeg(filePath, *imageSource); in SaveSnapshotFile() 252 WriteToJpeg(filePath, *snapshot); in SaveSnapshotFile() 306 if (!OHOS::FileExists(filePath)) { in DeleteMissionSnapshot() 308 filePath.c_str()); in DeleteMissionSnapshot() 330 int ret = stat(filePath.c_str(), &statbuf); in ReadFileToBuffer() 339 filePath.c_str()); in ReadFileToBuffer() 378 if (!OHOS::FileExists(filePath)) { in GetPixelMap() [all …]
|
/ohos5.0/foundation/multimedia/av_codec/test/nativedemo/avdemuxer/ |
H A D | avdemuxer_demo_runner.cpp | 164 g_filePath = filePath; in RunNativeDemuxer() 202 fd = open(filePath.c_str(), O_RDONLY); in RunDrmNativeDemuxer() 287 fd = open(filePath.c_str(), O_RDONLY); in RunInnerSourceDemuxer() 295 innerSourceDemo->CreateWithURI(filePath); in RunInnerSourceDemuxer() 393 RunNativeDemuxer(filePath, fileMode); in RunNativeDemuxerLoop() 455 RunNativeDemuxer(filePath, fileMode); in RunNativeDemuxerAllFormat() 459 cout << filePath << " loop done" << endl; in RunNativeDemuxerAllFormat() 492 string filePath; in AVSourceDemuxerDemoCase() local 503 (void)getline(cin, filePath); in AVSourceDemuxerDemoCase() 510 RunNativeDemuxer(filePath, fileMode); in AVSourceDemuxerDemoCase() [all …]
|