/ohos5.0/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/medialibrary_helper_test/src/ |
H A D | moving_photo_file_utils_test.cpp | 110 string imagePath = dirPath + "/" + "image.jpg"; 111 string videoPath = dirPath + "/" + "video.mp4"; 112 string extraDataPath = dirPath + "/" + "extraData"; 126 string videoPath = dirPath + "/" + "video.mp4"; 127 string extraDataPath = dirPath + "/" + "extraData"; 136 string dirPath = "/data/test/GetCoverPosition_001"; variable 138 string videoPath = dirPath + "/" + "video.mp4"; 297 string videoPath = dirPath + "/" + "video.mp4"; 310 string videoPath = dirPath + "/" + "video.mp4"; 326 string dirPath = "/data/test/GetFrameIndex_001"; variable [all …]
|
H A D | media_file_utils_test.cpp | 43 string dirPath = "/data/test/isdirempty_001"; variable 44 EXPECT_EQ(MediaFileUtils::IsDirEmpty(dirPath), false); 49 string dirPath = "/data/test/isdirempty_002"; variable 50 string subPath = dirPath + "/isdirempty_002"; 57 string dirPath = "/data/test/isdirempty_003"; variable 59 EXPECT_EQ(MediaFileUtils::IsDirEmpty(dirPath), true); 95 string dirPath = "/data/test/deletedir_001"; variable 97 EXPECT_EQ(MediaFileUtils::DeleteDir(dirPath), true); 102 string dirPath = "/data/test/deletedir_002"; variable 132 string dirPath = "/data/test/createdir_001"; variable [all …]
|
/ohos5.0/base/update/updater/services/applypatch/ |
H A D | store.cpp | 48 if (dirPath.empty() || fileName.empty()) { in FreeStore() 51 std::string path = dirPath + "/" + fileName; in FreeStore() 64 std::string dirPath = path + '/'; in CreateNewSpace() local 66 LOG(INFO) << "Create dir " << dirPath; in CreateNewSpace() 67 if (stat(dirPath.c_str(), &fileStat) == -1) { in CreateNewSpace() 72 if (MkdirRecursive(dirPath, S_IRWXU) != 0) { in CreateNewSpace() 81 if (GetFilesFromDirectory(dirPath, files) < 0) { in CreateNewSpace() 102 if (dirPath.empty()) { in WriteDataToStore() 107 pathTmp = dirPath + "/"; in WriteDataToStore() 131 int fdd = open(dirPath.c_str(), O_RDONLY | O_DIRECTORY); in WriteDataToStore() [all …]
|
/ohos5.0/foundation/bundlemanager/bundle_framework/services/bundlemgr/src/ |
H A D | bundle_scanner.cpp | 38 const std::list<std::string> &BundleScanner::Scan(const std::string &dirPath) in Scan() argument 43 APP_LOGD("path:%{private}s", dirPath.c_str()); in Scan() 44 if (!dirPath.empty()) { in Scan() 45 if (!ScanImpl(dirPath)) { in Scan() 59 bool BundleScanner::ScanImpl(const std::string &dirPath) in ScanImpl() argument 61 DIR *dirp = opendir(dirPath.c_str()); in ScanImpl() 63 …APP_LOGE("BundleScanner::ScanImpl open dir:%{private}s fail, errno:%{public}d", dirPath.c_str(), e… in ScanImpl() 80 entries_.push_back(dirPath + ServiceConstants::PATH_SEPARATOR + currentName); in ScanImpl()
|
/ohos5.0/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/observer/ |
H A D | os_event_listener.cpp | 129 bool OsEventListener::InitDir(const std::string& dirPath) in InitDir() argument 131 if (!FileUtil::IsFileExists(dirPath) && !FileUtil::ForceCreateDirectory(dirPath)) { in InitDir() 132 HILOG_ERROR(LOG_CORE, "failed to create dir=%{public}s", dirPath.c_str()); in InitDir() 135 if (OHOS::StorageDaemon::AclSetAccess(dirPath, "u:1201:rwx") != 0) { in InitDir() 136 HILOG_ERROR(LOG_CORE, "failed to set acl access dir=%{public}s", dirPath.c_str()); in InitDir() 156 bool OsEventListener::RegisterDirListener(const std::string& dirPath) in RegisterDirListener() argument 161 … HILOG_ERROR(LOG_CORE, "failed to inotify init : %s(%s).\n", strerror(errno), dirPath.c_str()); in RegisterDirListener() 164 inotifyWd_ = inotify_add_watch(inotifyFd_, dirPath.c_str(), IN_MOVED_TO | IN_CLOSE_WRITE); in RegisterDirListener() 166 … HILOG_ERROR(LOG_CORE, "failed to add watch entry : %s(%s).\n", strerror(errno), dirPath.c_str()); in RegisterDirListener() 171 HILOG_INFO(LOG_CORE, "inotify add watch dir=%{public}s successfully", dirPath.c_str()); in RegisterDirListener()
|
/ohos5.0/foundation/filemanagement/file_api/interfaces/kits/native/environment/ |
H A D | environment_native.cpp | 66 std::string dirPath = ""; in GetUserDir() local 67 dirPath = GetPublicPath(path); in GetUserDir() 68 *result = (char *) malloc((dirPath.length() + 1) * sizeof(char)); in GetUserDir() 72 int ret = strcpy_s(*result, (dirPath.length() + 1) * sizeof(char), dirPath.c_str()); in GetUserDir()
|
/ohos5.0/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/medialibrary_object_test/src/ |
H A D | medialibrary_object_test.cpp | 45 string dirPath = ""; variable 49 dirPath = "system/CreateDirWithPath/storage/cloud/data"; 50 ret = MediaLibraryObjectUtils::CreateDirWithPath(dirPath); 53 dirPath = "system/CreateDirWithPath.exe"; 60 ret = MediaFileUtils::DeleteFile(dirPath); 225 ret = MediaFileUtils::DeleteFile(dirPath); 334 ret = MediaFileUtils::DeleteFile(dirPath); 395 string dirPath = ""; variable 397 fileAsset->SetPath(dirPath); 501 string dirPath = "/storage/cloud/files/test"; variable [all …]
|
/ohos5.0/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/ |
H A D | hiappevent_write.cpp | 71 std::string dirPath = GetStorageDirPath(); in WriteEvent() local 72 if (dirPath.empty()) { in WriteEvent() 81 if (!FileUtil::IsFileExists(dirPath) && !FileUtil::ForceCreateDirectory(dirPath)) { in WriteEvent() 86 std::string filePath = FileUtil::GetFilePathByDir(dirPath, GetStorageFileName()); in WriteEvent()
|
/ohos5.0/foundation/distributeddatamgr/udmf/framework/innerkitsimpl/data/ |
H A D | unified_data_helper.cpp | 82 void UnifiedDataHelper::CreateDirIfNotExist(const std::string& dirPath, const mode_t& mode) in CreateDirIfNotExist() argument 84 if (OHOS::FileExists(dirPath)) { in CreateDirIfNotExist() 85 if (!OHOS::ForceRemoveDirectory(dirPath)) { in CreateDirIfNotExist() 86 …LOG_ERROR(UDMF_FRAMEWORK, "remove dir %{public}s failed, errno: %{public}d.", dirPath.c_str(), err… in CreateDirIfNotExist() 89 LOG_DEBUG(UDMF_FRAMEWORK, "ForceCreateDirectory, dir: %{public}s", dirPath.c_str()); in CreateDirIfNotExist() 90 bool success = OHOS::ForceCreateDirectory(dirPath); in CreateDirIfNotExist() 92 …LOG_ERROR(UDMF_FRAMEWORK, "create dir %{public}s failed, errno: %{public}d.", dirPath.c_str(), err… in CreateDirIfNotExist() 96 chmod(dirPath.c_str(), mode); in CreateDirIfNotExist()
|
/ohos5.0/foundation/ability/ability_runtime/services/abilitymgr/src/ |
H A D | mission_data_storage.cpp | 54 std::string dirPath = GetMissionDataDirPath(); in LoadAllMissionInfo() local 55 OHOS::GetDirFiles(dirPath, fileNameVec); in LoadAllMissionInfo() 91 std::string dirPath = OHOS::ExtractFilePath(filePath); in SaveMissionInfo() local 92 if (!OHOS::FileExists(dirPath)) { in SaveMissionInfo() 93 bool createDir = OHOS::ForceCreateDirectory(dirPath); in SaveMissionInfo() 95 TAG_LOGE(AAFwkTag::ABILITYMGR, "create dir %{public}s failed.", dirPath.c_str()); in SaveMissionInfo() 98 chmod(dirPath.c_str(), MODE); in SaveMissionInfo() 226 std::string dirPath = OHOS::ExtractFilePath(filePath); in SaveSnapshotFile() local 227 if (!OHOS::FileExists(dirPath)) { in SaveSnapshotFile() 228 bool createDir = OHOS::ForceCreateDirectory(dirPath); in SaveSnapshotFile() [all …]
|
/ohos5.0/foundation/multimedia/image_framework/frameworks/innerkitsimpl/stream/src/ |
H A D | file_packer_stream.cpp | 36 std::string dirPath; in FilePackerStream() local 39 dirPath = ExtractFilePath(filePath); in FilePackerStream() 42 dirPath = ""; in FilePackerStream() 46 if (!ImageUtils::PathToRealPath(dirPath, realPath)) { in FilePackerStream()
|
/ohos5.0/base/update/updater/services/include/applypatch/ |
H A D | store.h | 30 static int32_t FreeStore(const std::string &dirPath, const std::string &fileName); 32 static int32_t WriteDataToStore(const std::string &dirPath, const std::string &fileName, 35 static int32_t LoadDataFromStore(const std::string &dirPath, const std::string &fileName,
|
/ohos5.0/base/hiviewdfx/hiappevent/frameworks/cj/ffi/src/ |
H A D | hiappevent_impl.cpp | 98 std::string dirPath = GetStorageDirPath(); in HiWriteEvent() local 99 if (dirPath.empty()) { in HiWriteEvent() 106 if (!FileUtil::IsFileExists(dirPath) && !FileUtil::ForceCreateDirectory(dirPath)) { in HiWriteEvent() 110 CheckStorageSpace(dirPath); in HiWriteEvent() 111 std::string filePath = FileUtil::GetFilePathByDir(dirPath, GetStorageFileName()); in HiWriteEvent()
|
/ohos5.0/foundation/communication/dsoftbus/sdk/transmission/trans_channel/proxy/src/ |
H A D | client_trans_proxy_file_helper.c | 350 static int32_t GetDirPath(const char *fullPath, char *dirPath, int32_t dirPathLen) in GetDirPath() argument 372 if (strncpy_s(dirPath, dirPathLen, fullPath, dirLen) != EOK) { in GetDirPath() 381 char *dirPath = (char *)SoftBusCalloc(MAX_FILE_PATH_NAME_LEN); in GetAbsFullPath() local 382 if (dirPath == NULL) { in GetAbsFullPath() 385 if (GetDirPath(fullPath, dirPath, MAX_FILE_PATH_NAME_LEN) != SOFTBUS_OK) { in GetAbsFullPath() 387 SoftBusFree(dirPath); in GetAbsFullPath() 393 SoftBusFree(dirPath); in GetAbsFullPath() 403 if (GetAndCheckRealPath(dirPath, absFullDir) != SOFTBUS_OK) { in GetAbsFullPath() 407 TRANS_LOGI(TRANS_FILE, "dirPath=%{private}s, absFullDir=%{private}s", dirPath, absFullDir); in GetAbsFullPath() 422 SoftBusFree(dirPath); in GetAbsFullPath() [all …]
|
/ohos5.0/foundation/ability/idl_tool/idl_tool_2/util/ |
H A D | file.cpp | 321 … std::string dirPath = dirs.front().back() == SEPARATOR ? dirs.front() : dirs.front() + SEPARATOR; in CreatePartDir() local 323 DIR *dir = opendir(dirPath.c_str()); in CreatePartDir() 325 Logger::E(TAG, "failed to open '%s', errno:%d", dirPath.c_str(), errno); in CreatePartDir() 336 std::string filePath = dirPath + dirInfo->d_name; in CreatePartDir() 342 dirs.emplace(dirPath + dirInfo->d_name); in CreatePartDir() 346 std::string filePath = dirPath + dirInfo->d_name; in CreatePartDir()
|
/ohos5.0/foundation/arkui/ace_engine/adapter/preview/entrance/ |
H A D | rs_dir_asset_provider.h | 120 std::string dirPath = basePath_ + "\\" + path; in GetAssetList() local 123 … if ((hFind = FindFirstFile(dirPath.append("\\*").c_str(), &fileInfo)) != INVALID_HANDLE_VALUE) { in GetAssetList() 132 std::string dirPath = basePath_ + "/" + path; in GetAssetList() 134 if (nullptr == (dp = opendir(dirPath.c_str()))) { in GetAssetList()
|
/ohos5.0/foundation/ability/ability_runtime/frameworks/native/appkit/app/ |
H A D | extension_plugin_info.cpp | 117 std::string dirPath = EXTENSION_LIB; in ScanExtensions() local 118 DIR *dirp = opendir(dirPath.c_str()); in ScanExtensions() 120 TAG_LOGE(AAFwkTag::APPKIT, "ScanDir open dir:%{public}s fail", dirPath.c_str()); in ScanExtensions() 137 files.emplace_back(dirPath + PATH_SEPARATOR + currentName); in ScanExtensions()
|
/ohos5.0/foundation/communication/dsoftbus/adapter/common/kernel/posix/ |
H A D | softbus_adapter_file.c | 34 char dirPath[SOFTBUS_MAX_PATH_LEN] = {0}; in SoftBusCreateFile() local 43 if (memcpy_s(dirPath, sizeof(dirPath), fileName, len) != EOK) { in SoftBusCreateFile() 47 dirPath[len] = 0; in SoftBusCreateFile() 48 if (access(dirPath, F_OK) != 0) { in SoftBusCreateFile() 49 int32_t ret = mkdir(dirPath, S_IRWXU); in SoftBusCreateFile()
|
/ohos5.0/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/medialibrary_unittest_utils/src/ |
H A D | medialibrary_unittest_utils.cpp | 186 string dirPath; in CreateAlbum() local 188 dirPath = ROOT_MEDIA_DIR + displayName; in CreateAlbum() 190 dirPath = parentAlbumAsset->GetPath() + "/" + displayName; in CreateAlbum() 193 valuesBucket.Put(MEDIA_DATA_DB_FILE_PATH, dirPath); in CreateAlbum() 197 MEDIA_INFO_LOG("CreateAlbum:: %{private}s, retVal: %{public}d", dirPath.c_str(), retVal); in CreateAlbum() 199 MEDIA_ERR_LOG("CreateAlbum::create failed, %{private}s", dirPath.c_str()); in CreateAlbum() 203 MEDIA_ERR_LOG("CreateAlbum::GetFileAsset failed, %{private}s", dirPath.c_str()); in CreateAlbum()
|
/ohos5.0/base/hiviewdfx/hiview/interfaces/js/napi/src/ |
H A D | hiview_service_agent.cpp | 181 bool HiviewServiceAgent::CreateAndGrantAclPermission(const std::string& dirPath) in CreateAndGrantAclPermission() argument 183 if (!FileUtil::FileExists(dirPath) && !FileUtil::ForceCreateDirectory(dirPath)) { in CreateAndGrantAclPermission() 187 if (OHOS::StorageDaemon::AclSetAccess(dirPath, "g:1201:rwx") != 0) { in CreateAndGrantAclPermission()
|
/ohos5.0/foundation/multimedia/media_library/frameworks/innerkitsimpl/medialibrary_data_extension/src/ |
H A D | medialibrary_object_utils.cpp | 74 if (dirPath.empty()) { in CreateDirWithPath() 311 string lastPath = dirPath; in GetLastDirExistInDb() 391 string path = dirPath; in InsertDirToDbRecursively() 422 string dirPath; in CreateDirObj() local 426 valueObject.GetString(dirPath); in CreateDirObj() 428 if (dirPath.empty()) { in CreateDirObj() 436 rowId = GetIdByPathFromDb(dirPath); in CreateDirObj() 622 string dirPath = dirAsset->GetPath(); in DeleteDirObj() local 623 if (!MediaFileUtils::DeleteDir(dirPath)) { in DeleteDirObj() 901 UpdateDateModified(dirPath); in CloseFile() [all …]
|
/ohos5.0/foundation/bundlemanager/bundle_framework/services/bundlemgr/include/ |
H A D | bundle_scanner.h | 35 const std::list<std::string> &Scan(const std::string &dirPath); 43 bool ScanImpl(const std::string &dirPath);
|
/ohos5.0/drivers/hdf_core/framework/tools/hdi-gen/util/ |
H A D | file.cpp | 302 … std::string dirPath = dirs.front().back() == SEPARATOR ? dirs.front() : dirs.front() + SEPARATOR; in CreateParentDir() local 304 DIR *dir = opendir(dirPath.c_str()); in CreateParentDir() 306 Logger::E(TAG, "failed to open '%s', errno:%d", dirPath.c_str(), errno); in CreateParentDir() 317 std::string filePath = dirPath + dirInfo->d_name; in CreateParentDir() 323 dirs.emplace(dirPath + dirInfo->d_name); in CreateParentDir()
|
/ohos5.0/base/hiviewdfx/hiview/adapter/plugins/eventservice/service/idl/include/ |
H A D | data_share_store.h | 31 DataShareStore(std::string dirPath): dbStore_(nullptr), dirPath_(dirPath){}; in DataShareStore() argument
|
/ohos5.0/foundation/communication/netmanager_ext/services/ethernetmanager/include/ |
H A D | ethernet_configuration.h | 59 bool IsDirExist(const std::string &dirPath); 60 bool CreateDir(const std::string &dirPath); 61 bool DelDir(const std::string &dirPath);
|