/base/update/updater/services/applypatch/ |
H A D | store.cpp | 46 int32_t Store::FreeStore(const std::string &dirPath, const std::string &fileName)
in FreeStore() argument 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() 99 int32_t Store::WriteDataToStore(const std::string &dirPath, const std::string &fileName,
in WriteDataToStore() argument 102 if (dirPath in WriteDataToStore() 140 LoadDataFromStore(const std::string &dirPath, const std::string &fileName, std::vector<uint8_t> &buffer) LoadDataFromStore() argument [all...] |
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/ |
H A D | hiappevent_write.cpp | 69 std::string dirPath = GetStorageDirPath();
in WriteEvent() local 70 if (dirPath.empty()) {
in WriteEvent() 71 HILOG_ERROR(LOG_CORE, "dirPath is null, stop writing the event.");
in WriteEvent() 79 if (!FileUtil::IsFileExists(dirPath) && !FileUtil::ForceCreateDirectory(dirPath)) {
in WriteEvent() 84 std::string filePath = FileUtil::GetFilePathByDir(dirPath, GetStorageFileName());
in WriteEvent()
|
/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,
|
/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 in RegisterDirListener() [all...] |
/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
|
/base/hiviewdfx/hiappevent/frameworks/cj/ffi/src/ |
H A D | hiappevent_impl.cpp | 96 std::string dirPath = GetStorageDirPath(); in HiWriteEvent() local 97 if (dirPath.empty()) { in HiWriteEvent() 98 LOGE("dirPath is null, stop writing the event."); in HiWriteEvent() 104 if (!FileUtil::IsFileExists(dirPath) && !FileUtil::ForceCreateDirectory(dirPath)) { in HiWriteEvent() 108 CheckStorageSpace(dirPath); in HiWriteEvent() 109 std::string filePath = FileUtil::GetFilePathByDir(dirPath, GetStorageFileName()); in HiWriteEvent()
|
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/observer/include/ |
H A D | os_event_listener.h | 40 bool InitDir(const std::string& dirPath); 41 bool RegisterDirListener(const std::string& dirPath);
|
/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()
|
/base/hiviewdfx/hiview/plugins/reliability/bbox_detectors/ |
H A D | panic_error_info_handle.cpp | 165 string dirPath = "/data/log/bbox/" + in CopyPstoreFileToHistoryLog() local 168 if (!FileUtil::FileExists(dirPath)) { in CopyPstoreFileToHistoryLog() 169 FileUtil::ForceCreateDirectory(dirPath); in CopyPstoreFileToHistoryLog() 170 FileUtil::ChangeModeDirectory(dirPath, defaultLogDirMode); in CopyPstoreFileToHistoryLog() 172 string targetPath = dirPath + "last_kmsg"; in CopyPstoreFileToHistoryLog()
|
H A D | panic_report_recovery.cpp | 117 bool ClearFilesInDir(const std::filesystem::path& dirPath) in ClearFilesInDir() argument 119 if (!std::filesystem::is_directory(dirPath)) { in ClearFilesInDir() 120 HIVIEW_LOGE("The file %{public}s is not a directory.", dirPath.c_str()); in ClearFilesInDir() 124 for (const auto& entry : std::filesystem::directory_iterator(dirPath)) { in ClearFilesInDir()
|
H A D | panic_report_recovery.h | 55 * @param dirPath the path 58 bool ClearFilesInDir(const std::filesystem::path& dirPath);
|
/base/startup/appspawn/util/src/ |
H A D | appspawn_utils.c | 316 void DumpCurrentDir(char *buffer, uint32_t bufferLen, const char *dirPath) in DumpCurrentDir() argument 319 APPSPAWN_CHECK_ONLY_EXPER(dirPath != NULL, return); in DumpCurrentDir() 322 DIR *pDir = opendir(dirPath); in DumpCurrentDir() 323 APPSPAWN_CHECK(pDir != NULL, return, "Read dir :%{public}s failed.%{public}d", dirPath, errno); in DumpCurrentDir() 331 APPSPAWN_LOGW(" Current path %{public}s/%{public}s ", dirPath, dp->d_name); in DumpCurrentDir() 332 int ret = snprintf_s(buffer, bufferLen, bufferLen - 1, "%s/%s", dirPath, dp->d_name); in DumpCurrentDir()
|
/base/startup/init/services/utils/ |
H A D | init_utils.c | 527 int ReadFileInDir(const char *dirPath, const char *includeExt,
in ReadFileInDir() argument 530 INIT_CHECK_RETURN_VALUE(dirPath != NULL && processFile != NULL, -1);
in ReadFileInDir() 531 DIR *pDir = opendir(dirPath);
in ReadFileInDir() 532 INIT_ERROR_CHECK(pDir != NULL, return -1, "Read dir :%s failed.%d", dirPath, errno);
in ReadFileInDir() 535 return -1, "Failed to malloc for %s", dirPath);
in ReadFileInDir() 552 int ret = snprintf_s(fileName, MAX_BUF_SIZE, MAX_BUF_SIZE - 1, "%s/%s", dirPath, dp->d_name);
in ReadFileInDir() 563 INIT_LOGV("ReadFileInDir dirPath %s %d", dirPath, count);
in ReadFileInDir()
|
/base/security/huks/utils/file_operator/ |
H A D | hks_file_operator.h | 96 int32_t HksRemoveDir(const char *dirPath);
|
H A D | hks_file_operator.c | 342 int32_t HksRemoveDir(const char *dirPath)
in HksRemoveDir() argument 344 if (IsValidPath(dirPath) != HKS_SUCCESS) {
in HksRemoveDir() 348 int32_t ret = stat(dirPath, &fileStat);
in HksRemoveDir() 359 DIR *dir = opendir(dirPath);
in HksRemoveDir() 365 ret = HksFileRemove(dirPath, dire->d_name);
in HksRemoveDir()
|
H A D | hks_file_operator_lite.c | 257 int32_t HksRemoveDir(const char *dirPath)
in HksRemoveDir() argument 260 int32_t ret = stat(dirPath, &fileStat);
in HksRemoveDir() 271 DIR *dir = opendir(dirPath);
in HksRemoveDir() 277 ret = HksFileRemove(dirPath, dire->d_name);
in HksRemoveDir()
|
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/ |
H A D | cm_event_process.c | 129 static int32_t RemoveDir(const char *dirPath) in RemoveDir() argument 132 int32_t ret = stat(dirPath, &fileStat); in RemoveDir() 141 DIR *dir = opendir(dirPath); in RemoveDir() 149 ret = CmFileRemove(dirPath, dire->d_name); in RemoveDir() 157 (void)remove(dirPath); in RemoveDir()
|
/base/hiviewdfx/hiview/interfaces/js/napi/include/ |
H A D | hiview_service_agent.h | 46 bool CreateAndGrantAclPermission(const std::string& dirPath);
|
/base/hiviewdfx/hiview/framework/native/unified_collection/collector/inner_include/ |
H A D | trace_utils.h | 48 bool CreateMultiDirectory(const std::string &dirPath);
|
/base/startup/appspawn/service/hnp/installer/src/ |
H A D | hnp_installer.c | 479 static int HnpPackageGetAndInstall(const char *dirPath, HnpInstallInfo *hnpInfo, char *sunDir,
in HnpPackageGetAndInstall() argument 487 if ((dir = opendir(dirPath)) == NULL) {
in HnpPackageGetAndInstall() 488 HNP_LOGE("hnp install opendir:%{public}s unsuccess, errno=%{public}d", dirPath, errno);
in HnpPackageGetAndInstall() 496 if (sprintf_s(path, MAX_FILE_PATH_LEN, "%s/%s", dirPath, entry->d_name) < 0) {
in HnpPackageGetAndInstall() 497 HNP_LOGE("hnp install sprintf unsuccess, dir[%{public}s], path[%{public}s]", dirPath, entry->d_name);
in HnpPackageGetAndInstall()
|
/base/hiviewdfx/hiview/adapter/service/server/include/ |
H A D | hiview_service_ability.h | 86 void GetFileInfoUnderDir(const std::string& dirPath, std::vector<HiviewFileInfo>& fileInfos);
|
/base/startup/init/interfaces/innerkits/include/ |
H A D | init_utils.h | 91 int ReadFileInDir(const char *dirPath, const char *includeExt,
|
/base/hiviewdfx/hiview/adapter/service/server/src/ |
H A D | hiview_service_ability.cpp | 170 void HiviewServiceAbility::GetFileInfoUnderDir(const std::string& dirPath, std::vector<HiviewFileInfo>& fileInfos) in GetFileInfoUnderDir() argument 172 DIR* dir = opendir(dirPath.c_str()); in GetFileInfoUnderDir() 182 std::string filePath(dirPath + ent->d_name); in GetFileInfoUnderDir()
|
/base/hiviewdfx/hiview/framework/native/unified_collection/collector/utils/ |
H A D | trace_utils.cpp | 313 bool CreateMultiDirectory(const std::string &dirPath)
in CreateMultiDirectory() argument 315 uint32_t dirPathLen = dirPath.length();
in CreateMultiDirectory() 321 tmpDirPath[i] = dirPath[i];
in CreateMultiDirectory()
|
/base/telephony/core_service/services/sim/src/ |
H A D | operator_file_parser.cpp | 75 std::filesystem::path dirPath = std::string(DEFAULT_OPERATE_CONFIG_DIR); in DeleteFiles() local 77 std::filesystem::remove_all(dirPath, errorCode); in DeleteFiles()
|