Lines Matching refs:fileLength
119 const long long fileLength = file.tellg();
120 if (fileLength > MAX_FILE_LENGTH) {
121 UTILS_LOGD("invalid file length(%{public}lld)!", fileLength);
171 const off_t fileLength = lseek(fd, 0, SEEK_END);
172 if (fileLength > MAX_FILE_LENGTH) {
173 UTILS_LOGE("invalid file length(%{public}jd)!", static_cast<intmax_t>(fileLength));
178 if (fileLength < 0) {
182 if (fileLength == 0) {
186 content.resize(fileLength);
193 const ssize_t len = read(fd, content.data(), fileLength);
194 if (len != fileLength) {
195 UTILS_LOGE("the length read from file is not equal to fileLength!len:%{public}zd,fileLen:%{public}jd",
196 len, static_cast<intmax_t>(fileLength));
250 UTILS_LOGE("the length write to file is not equal to fileLength!len:%{public}zd, fileLen:%{public}zu",
304 const long long fileLength = file.tellg();
305 if (fileLength > MAX_FILE_LENGTH) {
306 UTILS_LOGD("invalid file length(%{public}lld)!", fileLength);
311 if (fileLength < 0) {
315 if (fileLength == 0) {
326 content.resize(fileLength);
327 file.read(&content[0], fileLength);