Home
last modified time | relevance | path

Searched refs:fileLength (Results 1 - 17 of 17) sorted by relevance

/developtools/hapsigner/hapsigntool_cpp/common/src/
H A Drandom_access_file.cpp30 : fd(-1), fileLength(0) in RandomAccessFile()
61 fileLength = file_stat.st_size; in Init()
68 return fileLength; in GetLength()
94 if (offset < 0 || offset > fileLength - bufCapacity) { in DoMMap()
96 ", range: %" PRId64, offset, fileLength - bufCapacity); in DoMMap()
158 int64_t remainLength = fileLength - position; in WriteToFile()
159 fileLength = (length <= remainLength) ? fileLength : (fileLength + (length - remainLength)); in WriteToFile()
161 if (ftruncate(fd, fileLength) in WriteToFile()
[all...]
/developtools/packing_tool/packing_tool/frameworks/src/json/
H A Dmodule_json_utils.cpp52 int64_t fileLength = Utils::GetFileLength(hapFilePath); in GetStageHapVerifyInfo() local
53 if (fileLength < 0) { in GetStageHapVerifyInfo()
68 hapVerifyInfo.SetFileLength(fileLength); in GetStageHapVerifyInfo()
84 int64_t fileLength = Utils::GetFileLength(hapFilePath); in GetFaHapVerifyInfo() local
85 if (fileLength < 0) { in GetFaHapVerifyInfo()
104 hapVerifyInfo.SetFileLength(fileLength); in GetFaHapVerifyInfo()
H A Dhap_verify_info.cpp263 void HapVerifyInfo::SetFileLength(const int64_t& fileLength) in SetFileLength() argument
265 fileLength_ = fileLength; in SetFileLength()
/developtools/profiler/hidebug/test/unittest/native/
H A Dhidebug_test.cpp241 uint32_t fileLength = 256; in HWTEST_F() local
247 auto captureResult = OH_HiDebug_StartAppTraceCapture(flag, tags, limitSize, fileName, fileLength); in HWTEST_F()
265 uint32_t fileLength = 256; in HWTEST_F() local
271 auto captureResult = OH_HiDebug_StartAppTraceCapture(flag, tags, limitSize, fileName, fileLength); in HWTEST_F()
274 auto captureResult2 = OH_HiDebug_StartAppTraceCapture(flag, tags, limitSize, fileName, fileLength); in HWTEST_F()
291 uint32_t fileLength = 256; in HWTEST_F() local
297 auto captureResult = OH_HiDebug_StartAppTraceCapture(flag, tags, limitSize, fileName, fileLength); in HWTEST_F()
/developtools/packing_tool/packing_tool/frameworks/test/unittest/app_packager_test/mock/
H A Dmock_module_json_utils.cpp79 int64_t fileLength = Utils::GetFileLength(hapFilePath); in GetStageHapVerifyInfo() local
80 if (fileLength < 0) { in GetStageHapVerifyInfo()
95 hapVerifyInfo.SetFileLength(fileLength); in GetStageHapVerifyInfo()
123 int64_t fileLength = Utils::GetFileLength(hapFilePath); in GetFaHapVerifyInfo() local
124 if (fileLength < 0) { in GetFaHapVerifyInfo()
143 hapVerifyInfo.SetFileLength(fileLength); in GetFaHapVerifyInfo()
/developtools/packing_tool/adapter/ohos/
H A DHapVerifyInfo.java125 private long fileLength = 0L; field in HapVerifyInfo
441 return fileLength; in getFileLength()
444 public void setFileLength(long fileLength) { in setFileLength() argument
445 this.fileLength = fileLength; in setFileLength()
/developtools/hapsigner/hapsigntool_cpp_test/fuzztest/zip/randomaccessfileinputoutput_fuzzer/
H A Drandomaccessfileinputoutput_fuzzer.cpp47 int64_t fileLength = file.GetLength(); in RandomAccessFileInputConstructor() local
48 RandomAccessFileInput fileInput(file, 0, fileLength); in RandomAccessFileInputConstructor()
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/utils/
H A DFileUtils.java463 final long fileLength = file.length(); in readFileToByteArray()
464 if (fileLength > Integer.MAX_VALUE) { in readFileToByteArray()
465 throw new IllegalArgumentException("Size cannot be greater than Integer max value: " + fileLength); in readFileToByteArray()
467 return toByteArray(in, (int) fileLength); in readFileToByteArray()
/developtools/profiler/device/plugins/native_daemon/src/
H A Dutilities.cpp160 const long fileLength = lseek(fileno(recordFile_), 0, SEEK_END); in Stop() local
161 content_.resize(fileLength); in Stop()
163 const long len = read(fileno(recordFile_), content_.data(), fileLength); in Stop()
167 HLOGE("tmp file read failed (try read %ld)", fileLength); in Stop()
168 } else if (len < fileLength) { in Stop()
169 HLOGE("not all the data is read, lost %ld/%ld bytes", fileLength - len, fileLength); in Stop()
/developtools/hapsigner/hapsigntool_cpp/utils/src/
H A Dhap_signer_block_utils.cpp104 int64_t fileLength = hapFile.GetLength(); in FindEocdInHap() local
106 if (fileLength < ZIP_EOCD_SEG_MIN_SIZE) { in FindEocdInHap()
107 SIGNATURE_TOOLS_LOGE("file length %" PRId64 " is too smaller", fileLength); in FindEocdInHap()
112 if (fileLength < static_cast<int64_t>(searchRange)) { in FindEocdInHap()
113 searchRange = static_cast<int>(fileLength); in FindEocdInHap()
117 int64_t searchRangeOffset = fileLength - searchEocdBuffer.GetCapacity(); in FindEocdInHap()
/developtools/hapsigner/hapsigntool_cpp/common/include/
H A Drandom_access_file.h59 int64_t fileLength; member in OHOS::SignatureTools::RandomAccessFile
/developtools/hiperf/src/
H A Dutilities.cpp206 const long fileLength = lseek(fileno(recordFile_), 0, SEEK_END); in Stop() local
207 content_.resize(fileLength); in Stop()
209 const long len = read(fileno(recordFile_), content_.data(), fileLength); in Stop()
213 HLOGE("tmp file read failed (try read %ld)", fileLength); in Stop()
214 } else if (len < fileLength) { in Stop()
215 HLOGE("not all the data is read, lost %ld/%ld bytes", fileLength - len, fileLength); in Stop()
/developtools/hapsigner/hapsigntool_cpp_test/unittest/hapVerify/
H A Dhap_signer_block_utils_test.cpp352 int64_t fileLength = hapTestFile2.GetLength(); in HWTEST_F() local
355 EXPECT_GT(hapTestFile2.ReadFileFullyFromOffset(eocd, fileLength - TEST_ZIP_EOCD_SIZE), 0); in HWTEST_F()
364 fileLength = hapTestFile3.GetLength(); in HWTEST_F()
366 EXPECT_GT(hapTestFile3.ReadFileFullyFromOffset(eocd2, fileLength - TEST_ZIP_EOCD_SIZE), 0); in HWTEST_F()
/developtools/hapsigner/hapsigntool_cpp/codesigning/sign/src/
H A Dcode_signing.cpp285 long fileLength = zFileInfo.uncompressed_size; in GetSingleFileStreamFromZip() local
298 fileLength -= nReadFileSize; in GetSingleFileStreamFromZip()
300 } while (fileLength > 0 && nReadFileSize > 0); in GetSingleFileStreamFromZip()
301 if (fileLength) { in GetSingleFileStreamFromZip()
/developtools/hapsigner/hapsigntool_cpp/hap/verify/src/
H A Dverify_elf.cpp216 int32_t fileLength = signBlockInfo.GetSignBlockMap().find(0)->second.GetOffset(); in GenerateFileDigest() local
218 std::vector<int8_t> generatedDig = HashUtils::GetDigestFromBytes(fileBytes, fileLength, digAlg); in GenerateFileDigest()
/developtools/packing_tool/packing_tool/frameworks/include/json/
H A Dhap_verify_info.h85 void SetFileLength(const int64_t& fileLength);
/developtools/packing_tool/packing_tool/frameworks/test/unittest/json/hap_verify_utils_test/
H A Dhap_verify_utils_test.cpp1113 int64_t fileLength = 1024; in HWTEST_F() local
1114 hapVerifyInfo3.SetFileLength(fileLength); in HWTEST_F()

Completed in 15 milliseconds