Home
last modified time | relevance | path

Searched refs:fileStat (Results 1 – 15 of 15) sorted by relevance

/base/update/updater/services/applypatch/
Dstore.cpp69 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/
Dhks_file_operator_lite.c92 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 …]
Dhks_file_operator.c115 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/
Dinit_cmds.c60 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/
Dhks_test_file_operator.c123 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/
Devent_log_catcher.cpp119 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/
Dhks_test_file_operator.c133 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/
Dinit_utils.c132 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/
Dcert_manager_file_operator.c127 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()
Dcm_event_process.c128 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/
Dcmd_func_test.cpp530 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/
Devent_logger_action_test.cpp89 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/
Devent_logger_catcher_test.cpp92 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/
Dnativetoken.c39 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/
Dinit_common_cmds.c268 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()