/base/update/updater/services/applypatch/ |
D | store.cpp | 69 struct stat fileStat {}; in CreateNewSpace() struct 71 if (stat(dirPath.c_str(), &fileStat) == -1) { in CreateNewSpace() 163 struct stat fileStat {}; in LoadDataFromStore() struct 164 if (stat(path.c_str(), &fileStat) == -1) { in LoadDataFromStore() 168 if (fileStat.st_size % H_BLOCK_SIZE != 0) { in LoadDataFromStore() 178 buffer.resize(fileStat.st_size); in LoadDataFromStore() 179 if (!ReadFully(fd, buffer.data(), fileStat.st_size)) { in LoadDataFromStore()
|
/base/security/huks/utils/file_operator/ |
D | hks_file_operator_lite.c | 92 struct stat fileStat; in IsFileExist() local 93 int32_t ret = stat(fileName, &fileStat); in IsFileExist() 127 struct stat fileStat; in FileSize() local 128 (void)memset_s(&fileStat, sizeof(fileStat), 0, sizeof(fileStat)); in FileSize() 129 if (stat(fileName, &fileStat) != 0) { in FileSize() 134 return (uint32_t)fileStat.st_size; in FileSize() 159 struct stat fileStat; in FileRemove() local 160 int32_t ret = stat(fileName, &fileStat); in FileRemove() 170 if (S_ISDIR(fileStat.st_mode)) { in FileRemove() 263 struct stat fileStat; in HksRemoveDir() local [all …]
|
D | hks_file_operator.c | 115 struct stat fileStat; in FileSize() local 116 (void)memset_s(&fileStat, sizeof(fileStat), 0, sizeof(fileStat)); in FileSize() 117 if (stat(fileName, &fileStat) != 0) { in FileSize() 122 return fileStat.st_size; in FileSize() 310 struct stat fileStat; in HksRemoveDir() local 311 int32_t ret = stat(dirPath, &fileStat); in HksRemoveDir() 317 if (!S_ISDIR(fileStat.st_mode)) { in HksRemoveDir()
|
/base/startup/init/services/init/lite/ |
D | init_cmds.c | 60 struct stat fileStat = { 0 }; in CheckValidCfg() local 61 …if (stat(path, &fileStat) != 0 || fileStat.st_size <= 0 || fileStat.st_size > LOADCFG_MAX_FILE_LEN… in CheckValidCfg()
|
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/sdk_test/src/ |
D | hks_test_file_operator.c | 123 struct stat fileStat; in FileSize() local 124 (void)memset_s(&fileStat, sizeof(fileStat), 0, sizeof(fileStat)); in FileSize() 125 if (stat(fileName, &fileStat) != 0) { in FileSize() 130 return fileStat.st_size; in FileSize()
|
/base/hiviewdfx/hiview/plugins/eventlogger/log_catcher/ |
D | event_log_catcher.cpp | 119 struct stat fileStat; in GetFdSize() local 120 if (fstat(fd, &fileStat) == -1) { in GetFdSize() 123 return fileStat.st_size; in GetFdSize()
|
/base/security/huks/test/unittest/huks_lite_test/common/ |
D | hks_test_file_operator.c | 133 struct stat fileStat; in FileSize() local 134 (void)memset_s(&fileStat, sizeof(fileStat), 0, sizeof(fileStat)); in FileSize() 135 if (stat(fileName, &fileStat) != 0) { in FileSize() 140 return fileStat.st_size; in FileSize()
|
/base/startup/init/services/utils/ |
D | init_utils.c | 132 struct stat fileStat = {0}; in ReadFileToBuf() local 135 if (stat(configFile, &fileStat) != 0 || in ReadFileToBuf() 136 fileStat.st_size <= 0 || fileStat.st_size > MAX_JSON_FILE_LEN) { in ReadFileToBuf() 145 buffer = (char*)malloc((size_t)(fileStat.st_size + 1)); in ReadFileToBuf() 151 if (fread(buffer, fileStat.st_size, 1, fd) != 1) { in ReadFileToBuf() 156 buffer[fileStat.st_size] = '\0'; in ReadFileToBuf()
|
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/ |
D | cert_manager_file_operator.c | 127 struct stat fileStat; in FileSize() local 128 (void)memset_s(&fileStat, sizeof(fileStat), 0, sizeof(fileStat)); in FileSize() 130 if (stat(fileName, &fileStat) != 0) { in FileSize() 135 return (uint32_t)fileStat.st_size; in FileSize()
|
D | cm_event_process.c | 128 struct stat fileStat; in RemoveDir() local 129 int32_t ret = stat(dirPath, &fileStat); in RemoveDir() 134 if (!S_ISDIR(fileStat.st_mode)) { in RemoveDir()
|
/base/startup/init/test/unittest/lite/ |
D | cmd_func_test.cpp | 530 struct stat fileStat = {0}; variable 531 EXPECT_EQ(0, stat(CFG_FILE.c_str(), &fileStat)); 532 EXPECT_EQ(CFG_FILE_UID, fileStat.st_uid); 533 EXPECT_EQ(CFG_FILE_GID, fileStat.st_gid); 534 EXPECT_EQ(CFG_FILE_MODE, CFG_FILE_MODE & fileStat.st_mode); 535 EXPECT_TRUE(fileStat.st_size > 0); 536 EXPECT_TRUE(fileStat.st_size <= MAX_JSON_FILE_LEN); 543 struct stat fileStat = {0}; in ReadFileToBuf() local 544 (void)stat(CFG_FILE.c_str(), &fileStat); in ReadFileToBuf() 551 buffer = static_cast<char*>(malloc(static_cast<size_t>(fileStat.st_size) + 1)); in ReadFileToBuf() [all …]
|
/base/hiviewdfx/hiview/plugins/eventlogger/test/unittest/common/ |
D | event_logger_action_test.cpp | 89 struct stat fileStat; in GetFdSize() local 90 if (fstat(fd, &fileStat) == -1) { in GetFdSize() 93 return fileStat.st_size; in GetFdSize()
|
/base/hiviewdfx/hiview/plugins/eventlogger/log_catcher/test/unittest/common/ |
D | event_logger_catcher_test.cpp | 92 struct stat fileStat; in GetFdSize() local 93 if (fstat(fd, &fileStat) == -1) { in GetFdSize() 96 return fileStat.st_size; in GetFdSize()
|
/base/security/access_token/interfaces/innerkits/nativetoken/src/ |
D | nativetoken.c | 39 struct stat fileStat; in GetFileBuff() local 52 if (stat(filePath, &fileStat) != 0) { in GetFileBuff() 57 if (fileStat.st_size == 0) { in GetFileBuff() 62 if (fileStat.st_size > MAX_JSON_FILE_LEN) { in GetFileBuff() 67 size_t fileSize = (unsigned)fileStat.st_size; in GetFileBuff()
|
/base/startup/init/services/init/ |
D | init_common_cmds.c | 268 struct stat fileStat = { 0 }; in DoCopy() local 269 if (stat(ctx->argv[0], &fileStat) != 0) { in DoCopy() 273 mode_t mode = fileStat.st_mode; in DoCopy()
|