| /base/startup/init/interfaces/innerkits/sandbox/ |
| D | system-sandbox64.json | 4 "src-path" : "/system/bin", 5 "sandbox-path" : "/system/bin", 8 "src-path" : "/system/etc", 9 "sandbox-path" : "/system/etc", 12 "src-path" : "/system/lib64", 13 "sandbox-path" : "/system/lib64", 16 "src-path" : "/system/lib", 17 "sandbox-path" : "/system/lib", 20 "src-path" : "/system/profile", 21 "sandbox-path" : "/system/profile", [all …]
|
| D | chipset-sandbox.json | 4 "src-path" : "/system/bin", 5 "sandbox-path" : "/system/bin", 8 "src-path" : "/system/etc", 9 "sandbox-path" : "/system/etc", 12 "src-path" : "/system/lib", 13 "sandbox-path" : "/system/lib", 16 "src-path" : "/system/profile", 17 "sandbox-path" : "/system/profile", 20 "src-path" : "/system/app", 21 "sandbox-path" : "/system/app", [all …]
|
| D | system-sandbox.json | 4 "src-path" : "/system/bin", 5 "sandbox-path" : "/system/bin", 8 "src-path" : "/system/etc", 9 "sandbox-path" : "/system/etc", 12 "src-path" : "/system/lib", 13 "sandbox-path" : "/system/lib", 16 "src-path" : "/system/profile", 17 "sandbox-path" : "/system/profile", 20 "src-path" : "/system/app", 21 "sandbox-path" : "/system/app", [all …]
|
| D | chipset-sandbox64.json | 4 "src-path" : "/system/bin", 5 "sandbox-path" : "/system/bin", 8 "src-path" : "/system/etc", 9 "sandbox-path" : "/system/etc", 12 "src-path" : "/system/lib64", 13 "sandbox-path" : "/system/lib64", 16 "src-path" : "/system/lib", 17 "sandbox-path" : "/system/lib", 20 "src-path" : "/system/profile", 21 "sandbox-path" : "/system/profile", [all …]
|
| /base/startup/appspawn/ |
| D | appdata-sandbox.json | 7 "src-path" : "/config", 8 "sandbox-path" : "/config", 12 "src-path" : "/dev", 13 "sandbox-path" : "/dev", 17 "src-path" : "/proc", 18 "sandbox-path" : "/proc", 22 "src-path" : "/sys", 23 "sandbox-path" : "/sys", 27 "src-path" : "/sys_prod", 28 "sandbox-path" : "/sys_prod", [all …]
|
| D | appdata-sandbox64.json | 7 "src-path" : "/config", 8 "sandbox-path" : "/config", 12 "src-path" : "/dev", 13 "sandbox-path" : "/dev", 17 "src-path" : "/proc", 18 "sandbox-path" : "/proc", 22 "src-path" : "/sys", 23 "sandbox-path" : "/sys", 27 "src-path" : "/sys_prod", 28 "sandbox-path" : "/sys_prod", [all …]
|
| /base/account/os_account/frameworks/common/file_operator/src/ |
| D | account_file_operator.cpp | 39 ErrCode AccountFileOperator::CreateDir(const std::string &path) in CreateDir() argument 43 if (!OHOS::ForceCreateDirectory(path)) { in CreateDir() 44 ACCOUNT_LOGE("failed to create %{public}s, errno %{public}d.", path.c_str(), errno); in CreateDir() 48 bool createFlag = OHOS::ChangeModeDirectory(path, mode); in CreateDir() 50 … ACCOUNT_LOGE("failed to change mode for %{public}s, errno %{public}d.", path.c_str(), errno); in CreateDir() 57 ErrCode AccountFileOperator::DeleteDirOrFile(const std::string &path) in DeleteDirOrFile() argument 60 if (IsExistFile(path)) { in DeleteDirOrFile() 61 delFlag = OHOS::RemoveFile(path); in DeleteDirOrFile() 63 if (IsExistDir(path)) { in DeleteDirOrFile() 64 delFlag = OHOS::ForceRemoveDirectory(path); in DeleteDirOrFile() [all …]
|
| /base/hiviewdfx/faultloggerd/utils/ |
| D | directory_ex.cpp | 59 string ExcludeTrailingPathDelimiter(const std::string& path) in ExcludeTrailingPathDelimiter() argument 61 if (path.rfind("/") != path.size() - 1) { in ExcludeTrailingPathDelimiter() 62 return path; in ExcludeTrailingPathDelimiter() 65 if (!path.empty()) { in ExcludeTrailingPathDelimiter() 66 return path.substr(0, path.size() - 1); in ExcludeTrailingPathDelimiter() 69 return path; in ExcludeTrailingPathDelimiter() 72 string IncludeTrailingPathDelimiter(const std::string& path) in IncludeTrailingPathDelimiter() argument 74 if (path.rfind("/") != path.size() - 1) { in IncludeTrailingPathDelimiter() 75 return path + "/"; in IncludeTrailingPathDelimiter() 78 return path; in IncludeTrailingPathDelimiter() [all …]
|
| D | directory_ex.h | 30 * The GetCurrentProcPath function get the current process exe path. 35 * The ExtractFilePath function extract the input file path. 51 * return the path without the end '/'. 53 std::string ExcludeTrailingPathDelimiter(const std::string& path); 57 * return the path with the end '/'. 59 std::string IncludeTrailingPathDelimiter(const std::string& path); 62 * The GetDirFiles function get all files in the path. 64 void GetDirFiles(const std::string& path, std::vector<std::string>& files); 67 * The IsEmptyFolder function judge the path is empty, 70 bool IsEmptyFolder(const std::string& path); [all …]
|
| /base/hiviewdfx/hiview/adapter/utility/platform/ohos/ |
| D | file_util.cpp | 81 std::string IncludeTrailingPathDelimiter(const std::string& path) in IncludeTrailingPathDelimiter() argument 83 return OHOS::IncludeTrailingPathDelimiter(path); in IncludeTrailingPathDelimiter() 86 std::string ExcludeTrailingPathDelimiter(const std::string& path) in ExcludeTrailingPathDelimiter() argument 88 return OHOS::ExcludeTrailingPathDelimiter(path); in ExcludeTrailingPathDelimiter() 91 void GetDirFiles(const std::string& path, std::vector<std::string>& files) in GetDirFiles() argument 93 return OHOS::GetDirFiles(path, files); in GetDirFiles() 96 bool ForceCreateDirectory(const std::string& path) in ForceCreateDirectory() argument 98 return OHOS::ForceCreateDirectory(path); in ForceCreateDirectory() 101 bool ForceCreateDirectory(const string& path, mode_t mode) in ForceCreateDirectory() argument 105 index = path.find('/', index + 1); in ForceCreateDirectory() [all …]
|
| /base/hiviewdfx/faultloggerd/common/util/ |
| D | dfx_cutil.c | 39 bool ReadStringFromFile(const char* path, char* dst, size_t dstSz) in ReadStringFromFile() argument 48 fd = open(path, O_RDONLY); in ReadStringFromFile() 81 char path[NAME_LEN]; in GetThreadName() local 82 (void)memset_s(path, sizeof(path), '\0', sizeof(path)); in GetThreadName() 83 if (snprintf_s(path, sizeof(path), sizeof(path) - 1, "/proc/%d/comm", getpid()) <= 0) { in GetThreadName() 86 return ReadStringFromFile(path, buffer, bufferSz); in GetThreadName() 91 char path[NAME_LEN]; in GetProcessName() local 92 (void)memset_s(path, sizeof(path), '\0', sizeof(path)); in GetProcessName() 93 if (snprintf_s(path, sizeof(path), sizeof(path) - 1, "/proc/%d/cmdline", getpid()) <= 0) { in GetProcessName() 96 return ReadStringFromFile(path, buffer, bufferSz); in GetProcessName()
|
| D | musl_cutil.h | 39 bool ReadStringFromFile(const char* path, char* dst, size_t dstSz) in ReadStringFromFile() argument 47 fd = open(path, O_RDONLY); in ReadStringFromFile() 79 char path[NAME_LEN]; in GetThreadName() local 80 memset(path, '\0', sizeof(path)); in GetThreadName() 81 if (snprintf(path, sizeof(path) - 1, "/proc/%d/comm", getpid()) <= 0) { in GetThreadName() 84 return ReadStringFromFile(path, buffer, bufferSz); in GetThreadName() 89 char path[NAME_LEN]; in GetProcessName() local 90 memset(path, '\0', sizeof(path)); in GetProcessName() 91 if (snprintf(path, sizeof(path) - 1, "/proc/%d/cmdline", getpid()) <= 0) { in GetProcessName() 94 return ReadStringFromFile(path, buffer, bufferSz); in GetProcessName()
|
| /base/update/updater/test/unittest/utils/ |
| D | utils_unittest.cpp | 72 string path = string(PATH_MAX, 'a') + "/"; variable 73 EXPECT_EQ(Utils::MkdirRecursive(path, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH), -1); 74 path = "/data/updater/firstDir/secondDir"; 75 EXPECT_EQ(Utils::MkdirRecursive(path, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH), 0); 91 string path = "/no_exist"; variable 92 EXPECT_EQ(Utils::GetFilesFromDirectory(path, files, true), -1); 93 path = "/data"; 94 Utils::GetFilesFromDirectory(path, files, true); 99 string path = "/data/updater/test_file"; variable 101 auto fd = open(path.c_str(), O_RDWR | O_CREAT, 0777); [all …]
|
| /base/hiviewdfx/hiview/adapter/utility/platform/windows/ |
| D | file_util.cpp | 39 std::string IncludeTrailingPathDelimiter(const std::string& path) in IncludeTrailingPathDelimiter() argument 44 std::string ExcludeTrailingPathDelimiter(const std::string& path) in ExcludeTrailingPathDelimiter() argument 55 int Open(const std::string& path, const int flags, const mode_t mode) in Open() argument 58 return open(path.c_str(), flags, defaultMode); in Open() 61 void CreateDirWithDefaultPerm(const std::string& path, uid_t aidRoot, uid_t aidSystem) in CreateDirWithDefaultPerm() argument 63 FileUtil::ForceCreateDirectory(path); in CreateDirWithDefaultPerm() 66 void FormatPath2UnixStyle(std::string &path) in FormatPath2UnixStyle() argument 68 replace(path.begin(), path.end(), '\\', '/'); in FormatPath2UnixStyle() 71 void RemoveFolderBeginWith(const std::string &path, const std::string &folderName) in RemoveFolderBeginWith() argument 73 if (!fs::exists(path)) { in RemoveFolderBeginWith() [all …]
|
| /base/update/packaging_tools/ |
| D | build_update.py | 21 target_package Target package file path. 22 update_package Update package file path. 27 Source package file path. 31 Variable partition mode, Partition list file path. 39 Private key file path. 44 -xp, --xml_path XML file path. 95 if arg is not None and not os.path.exists(arg): 97 "FileNotFoundError, path: %s" % arg, UPDATE_LOGGER.ERROR_LOG) 109 if arg != "ON_SERVER" and not os.path.isfile(arg): 111 "FileNotFoundError, path: %s" % arg, UPDATE_LOGGER.ERROR_LOG) [all …]
|
| /base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/include/ |
| D | cert_manager_file_operator.h | 32 uint32_t CmFileRead(const char *path, const char *fileName, uint32_t offset, uint8_t *buf, uint32_t… 34 int32_t CmFileWrite(const char *path, const char *fileName, uint32_t offset, const uint8_t *buf, ui… 36 int32_t CmFileRemove(const char *path, const char *fileName); 38 uint32_t CmFileSize(const char *path, const char *fileName); 40 int32_t CmIsFileExist(const char *path, const char *fileName); 42 int32_t CmMakeDir(const char *path); 44 void *CmOpenDir(const char *path); 50 int32_t CmIsDirExist(const char *path); 52 int32_t CmUserIdLayerGetFileCountAndNames(const char *path, struct CmBlob *fileNames, 55 int32_t CmUidLayerGetFileCountAndNames(const char *path, struct CmBlob *fileNames, [all …]
|
| /base/security/huks/utils/file_operator/ |
| D | hks_file_operator.c | 35 static int32_t GetFileName(const char *path, const char *fileName, char *fullFileName, uint32_t ful… in GetFileName() argument 37 if (path != NULL) { in GetFileName() 38 if (strncpy_s(fullFileName, fullFileNameLen, path, strlen(path)) != EOK) { in GetFileName() 42 if (path[strlen(path) - 1] != '/') { in GetFileName() 60 static int32_t GetFullFileName(const char *path, const char *fileName, char **fullFileName) in GetFullFileName() argument 67 int32_t ret = GetFileName(path, fileName, tmpFileName, nameLen); in GetFullFileName() 95 HKS_LOG_E("invalid filePath, path %" LOG_PUBLIC "s", filePath); in FileRead() 204 int32_t HksFileRemove(const char *path, const char *fileName) in HksFileRemove() argument 209 int32_t ret = GetFullFileName(path, fileName, &fullFileName); in HksFileRemove() 217 int32_t HksIsFileExist(const char *path, const char *fileName) in HksIsFileExist() argument [all …]
|
| /base/hiviewdfx/hiview/adapter/utility/ |
| D | file_util.cpp | 181 return fs::path(fileFullName).parent_path().string(); in ExtractFilePath() 186 return fs::path(fileFullName).filename().string(); in ExtractFileName() 189 void GetDirFiles(const std::string& path, std::vector<std::string>& files) in GetDirFiles() argument 192 for (const auto& p : fs::directory_iterator(path)) { in GetDirFiles() 193 files.push_back(p.path().string()); in GetDirFiles() 199 bool ForceCreateDirectory(const std::string& path) in ForceCreateDirectory() argument 202 if (fs::exists(path, ec)) { in ForceCreateDirectory() 205 if (!fs::create_directories(path, ec)) { in ForceCreateDirectory() 208 return fs::exists(path, ec); in ForceCreateDirectory() 211 bool ForceCreateDirectory(const std::string& path, int mode) in ForceCreateDirectory() argument [all …]
|
| /base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/ |
| D | cert_manager_file.c | 25 inline uint32_t CertManagerFileSize(const char *path, const char *fileName) in CertManagerFileSize() argument 27 return CmFileSize(path, fileName); in CertManagerFileSize() 30 inline uint32_t CertManagerFileRead(const char *path, const char *fileName, uint32_t offset, uint8_… in CertManagerFileRead() argument 32 return CmFileRead(path, fileName, offset, buf, len); in CertManagerFileRead() 35 inline int32_t CertManagerFileWrite(const char *path, const char *fileName, in CertManagerFileWrite() argument 38 return CmFileWrite(path, fileName, offset, buf, len); in CertManagerFileWrite() 41 inline int32_t CertManagerFileRemove(const char *path, const char *fileName) in CertManagerFileRemove() argument 43 return CmFileRemove(path, fileName); in CertManagerFileRemove() 46 static int32_t GetNumberOfFiles(const char *path) in GetNumberOfFiles() argument 48 void *dir = CmOpenDir(path); in GetNumberOfFiles() [all …]
|
| /base/security/selinux/scripts/ |
| D | build_policy.py | 46 '--dst-file', help='the policy dest path', required=True) 47 parser.add_argument('--tool-path', 48 help='the policy tool bin path', required=True) 50 help='prj root path', required=True) 65 folder_list.append(os.path.join(root, dir_i)) 74 policy_file_list.append(os.path.join(root, each_file)) 107 check_policy_cmd = [os.path.join(args.tool_path, "checkpolicy"), 115 build_policy_cmd = [os.path.join(args.tool_path, "secilc"), 131 path = os.path.join(root_dir, i) 132 if (os.path.exists(path)): [all …]
|
| /base/security/selinux/test/unittest/common/ |
| D | test_common.cpp | 24 bool CreateDirectory(const std::string &path) in CreateDirectory() argument 29 index = path.find('/', index + 1); in CreateDirectory() 31 subPath = path; in CreateDirectory() 33 subPath = path.substr(0, index); in CreateDirectory() 43 return access(path.c_str(), F_OK) == 0; in CreateDirectory() 46 bool RemoveDirectory(const std::string &path) in RemoveDirectory() argument 54 if (access(path.c_str(), F_OK) != 0) { in RemoveDirectory() 57 int statRet = stat(path.c_str(), &dirStat); in RemoveDirectory() 63 remove(path.c_str()); in RemoveDirectory() 65 dirp = opendir(path.c_str()); in RemoveDirectory() [all …]
|
| /base/hiviewdfx/hiview/adapter/utility/include/ |
| D | file_util.h | 67 int32_t CreateFile(const std::string &path, mode_t mode = DEFAULT_FILE_MODE); 72 std::string IncludeTrailingPathDelimiter(const std::string& path); 73 std::string ExcludeTrailingPathDelimiter(const std::string& path); 74 void GetDirFiles(const std::string& path, std::vector<std::string>& files); 75 bool ForceCreateDirectory(const std::string& path); 76 bool ForceCreateDirectory(const std::string& path, mode_t mode); 77 void RemoveFolderBeginWith(const std::string &path, const std::string &folderName); 78 bool ForceRemoveDirectory(const std::string& path, bool isNeedDeleteGivenDirSelf = true); 80 uint64_t GetFolderSize(const std::string& path); 81 uint64_t GetFileSize(const std::string& path); [all …]
|
| /base/hiviewdfx/hiview/build/ |
| D | run_oem_hook.py | 22 def find_oem_script(path): argument 23 for relpath, dirs, files in os.walk(path): 25 script_path = os.path.join(path, relpath, "oem_hook.py") 26 return os.path.normpath(os.path.abspath(script_path)) 41 hiview_build_path = os.path.split(os.path.realpath(__file__))[0] 42 hiview_path = os.path.realpath(os.path.join(hiview_build_path, "..")) 55 out_dir = os.path.dirname(output_file) 57 if os.path.isdir(out_dir) is False:
|
| D | plugin_build.json | 4 "path": "core", string 8 "path": "plugins/eventservice", string 12 "path": "plugins/faultlogger", string 16 "path": "plugins/eventlogger", string 20 "path": "plugins/freeze_detector", string 24 "path": "plugins/hicollie_collector", string 28 "path": "plugins/usage_event_report", string 32 "path": "plugins/reliability/bbox_detectors", string
|
| /base/security/device_auth/deps_adapter/os_adapter/impl/src/liteos/mini/ |
| D | hc_file.c | 27 static int HcFileOpenRead(const char *path) in HcFileOpenRead() argument 29 int ret = UtilsFileOpen(path, O_RDONLY, 0); in HcFileOpenRead() 34 static int HcFileOpenWrite(const char *path) in HcFileOpenWrite() argument 36 int ret = UtilsFileOpen(path, O_RDWR_FS | O_CREAT_FS | O_TRUNC_FS, 0); in HcFileOpenWrite() 41 int HcFileOpen(const char *path, int mode, FileHandle *file) in HcFileOpen() argument 43 if (path == NULL || file == NULL) { in HcFileOpen() 46 if (strcpy_s(file->filePath, MAX_FILE_PATH_SIZE, path) != EOK) { in HcFileOpen() 51 file->fileHandle.fd = HcFileOpenRead(path); in HcFileOpen() 53 file->fileHandle.fd = HcFileOpenWrite(path); in HcFileOpen() 104 void HcFileRemove(const char *path) in HcFileRemove() argument [all …]
|