Home
last modified time | relevance | path

Searched refs:zipFile (Results 1 - 21 of 21) sorted by relevance

/base/security/dlp_permission_service/interfaces/inner_api/dlp_parse/test/
H A Ddlp_zip_test.cpp107 std::string zipFile("test_zip"); in HWTEST_F()
109 int32_t res = AddBuffToZip(buf.c_str(), buf.size(), inZip.c_str(), zipFile.c_str()); in HWTEST_F()
112 int32_t fd = open(zipFile.c_str(), O_RDWR | O_CREAT, 0666); in HWTEST_F()
115 res = AddBuffToZip(buf.c_str(), buf.size(), inZip.c_str(), zipFile.c_str()); in HWTEST_F()
118 res = AddBuffToZip(buf.c_str(), buf.size(), inZip.c_str(), zipFile.c_str()); in HWTEST_F()
121 unlink(zipFile.c_str()); in HWTEST_F()
134 std::string zipFile("test_zip"); in HWTEST_F()
136 int32_t res = AddFileContextToZip(-1, inZip.c_str(), zipFile.c_str()); in HWTEST_F()
139 int32_t fd = open(zipFile.c_str(), O_RDWR | O_CREAT, 0666); in HWTEST_F()
145 res = AddFileContextToZip(fd2, inZip.c_str(), zipFile in HWTEST_F()
[all...]
/base/startup/appspawn/service/hnp/base/
H A Dhnp_zip.c72 static int ZipAddFile(const char* file, int offset, zipFile zf) in ZipAddFile()
149 static int ZipAddDir(const char *sourcePath, int offset, zipFile zf);
151 static int ZipHandleDir(char *fullPath, int offset, zipFile zf) in ZipHandleDir()
172 static int ZipAddDir(const char *sourcePath, int offset, zipFile zf) in ZipAddDir()
223 static int ZipDir(const char *sourcePath, int offset, zipFile zf) in ZipDir()
243 int HnpZip(const char *inputDir, zipFile zf) in HnpZip()
270 int HnpAddFileToZip(zipFile zf, char *filename, char *buff, int size) in HnpAddFileToZip()
290 static int HnpUnZipForFile(const char *filePath, unzFile zipFile, unz_file_info fileInfo) in HnpUnZipForFile() argument
307 unzOpenCurrentFile(zipFile); in HnpUnZipForFile()
311 readSize = unzReadCurrentFile(zipFile, buffe in HnpUnZipForFile()
394 unzFile zipFile = unzOpen(path); HnpFileCountGet() local
427 unzFile zipFile = unzOpen(inputFile); HnpUnZip() local
483 unzFile zipFile = unzOpen(inputFile); HnpCfgGetFromZip() local
[all...]
H A Dhnp_base.h264 int HnpZip(const char *inputDir, zipFile zf);
269 int HnpAddFileToZip(zipFile zf, char *filename, char *buff, int size);
/base/hiviewdfx/hidumper/frameworks/native/include/util/zip/
H A Dzip_writer.h39 static zipFile OpenForZipping(const std::string &fileName, int append);
40 static bool ZipOpenNewFileInZip(zipFile zip_file, const std::string &strPath);
41 static bool AddFileContentToZip(zipFile zip_file, std::string &file_path);
42 static bool OpenNewFileEntry(zipFile zip_file, std::string &path);
43 static bool CloseNewFileEntry(zipFile zip_file);
44 static bool AddFileEntryToZip(zipFile zip_file, std::string &relativePath, std::string &absolutePath);
48 zipFile zipFile_;
/base/update/updater/test/fuzztest/package_fuzzer/
H A Dpackage_fuzzer.cpp165 ZipFileInfo zipFile; in TestGZipPkgCompress() local
166 zipFile.fileInfo.identity = testPackageName; in TestGZipPkgCompress()
167 zipFile.fileInfo.packMethod = PKG_COMPRESS_METHOD_GZIP; in TestGZipPkgCompress()
168 zipFile.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in TestGZipPkgCompress()
170 files.push_back(std::pair<std::string, ZipFileInfo>(fileName, zipFile)); in TestGZipPkgCompress()
215 Lz4FileInfo zipFile; in TestLz4PkgCompress() local
217 zipFile.fileInfo.identity = testPackageName; in TestLz4PkgCompress()
218 zipFile.fileInfo.packMethod = PKG_COMPRESS_METHOD_LZ4; in TestLz4PkgCompress()
219 zipFile.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in TestLz4PkgCompress()
220 zipFile in TestLz4PkgCompress()
[all...]
H A Dpkg_fuzz_test.h180 ZipFileInfo zipFile; in CreateZipPackage() local
181 zipFile.fileInfo.identity = name; in CreateZipPackage()
182 zipFile.fileInfo.packMethod = PKG_COMPRESS_METHOD_ZIP; in CreateZipPackage()
183 zipFile.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in CreateZipPackage()
185 files.push_back(std::pair<std::string, ZipFileInfo>(fileName, zipFile)); in CreateZipPackage()
/base/global/resource_management_lite/frameworks/resmgr_lite/include/
H A Dhap_parser.h33 * @param zipFile
40 static int32_t ReadFileFromZip(const char *zipFile, const char *fileName, void **buffer,
45 * @param zipFile hap file path
51 static int32_t ReadIndexFromFile(const char *zipFile, void **buffer,
/base/hiviewdfx/hidumper/frameworks/native/src/util/zip/
H A Dzip_writer.cpp151 zipFile ZipWriter::OpenForZipping(const std::string &fileName, int append) in OpenForZipping()
156 bool ZipWriter::ZipOpenNewFileInZip(zipFile zip_file, const std::string &strPath) in ZipOpenNewFileInZip()
173 bool ZipWriter::AddFileContentToZip(zipFile zip_file, std::string &file_path) in AddFileContentToZip()
210 bool ZipWriter::OpenNewFileEntry(zipFile zip_file, std::string &path) in OpenNewFileEntry()
220 bool ZipWriter::CloseNewFileEntry(zipFile zip_file) in CloseNewFileEntry()
231 bool ZipWriter::AddFileEntryToZip(zipFile zip_file, std::string &relativePath, std::string &absolutePath) in AddFileEntryToZip()
/base/global/resource_management_lite/frameworks/resmgr_lite/src/utils/
H A Dhap_parser.cpp38 void UnzCloseFileAndLog(unzFile uf, const char *zipFile) in UnzCloseFileAndLog() argument
42 HILOG_ERROR("Error %d with zipfile %s in unzCloseCurrentFile", err, zipFile); in UnzCloseFileAndLog()
46 int32_t HapParser::ReadFileFromZip(const char *zipFile, const char *fileName, void **buffer, size_t &bufLen, in ReadFileFromZip() argument
53 unzFile uf = unzOpen64(zipFile); // open zipfile stream in ReadFileFromZip()
55 errInfo = FormatString("Cannot open %s", zipFile); in ReadFileFromZip()
62 errInfo = FormatString("File %s not found in %s", fileName, zipFile); in ReadFileFromZip()
68 errInfo = FormatString("Error %d with zipfile %s in unzGetCurrentFileInfo.", err, zipFile); in ReadFileFromZip()
82 errInfo = FormatString("Error %d with zipfile %s in unzOpenCurrentFilePassword.", err, zipFile); in ReadFileFromZip()
89 HILOG_DEBUG("Extracting: %s from %s, file size: %lu", filenameInzip, zipFile, fileInfo.uncompressed_size); in ReadFileFromZip()
92 errInfo = FormatString("Error %d with zipfile %s in unzReadCurrentFile", err, zipFile); in ReadFileFromZip()
126 ReadIndexFromFile(const char *zipFile, void **buffer, size_t &bufLen, std::string &errInfo) ReadIndexFromFile() argument
[all...]
/base/security/dlp_permission_service/interfaces/inner_api/dlp_parse/src/
H A Ddlp_zip.cpp52 zipFile zf = zipOpen64(zipName, APPEND_STATUS_ADDINZIP); in AddBuffToZip()
95 zipFile zf = zipOpen64(zipName, APPEND_STATUS_ADDINZIP); in AddFileContextToZip()
203 static zipFile OpenZipFile(int fd) in OpenZipFile()
205 zipFile uf = OpenFdForUnzipping(fd); in OpenZipFile()
215 zipFile uf = OpenZipFile(fd); in CheckUnzipFileInfo()
265 zipFile uf; in UnzipSpecificFile()
/base/hiviewdfx/hiview/framework/native/unified_collection/collector/utils/
H A Dtrace_utils.cpp400 zipFile zipFile = zipOpen((UNIFIED_SHARE_TEMP_PATH + zipFileName).c_str(), APPEND_STATUS_CREATE); in ZipTraceFile() local
401 if (zipFile == nullptr) { in ZipTraceFile()
410 zipFile, sysFileName.c_str(), &zipInfo, nullptr, 0, nullptr, 0, nullptr, Z_DEFLATED, Z_DEFAULT_COMPRESSION); in ZipTraceFile()
420 zipWriteInFileInZip(zipFile, buf, static_cast<unsigned int>(numBytes)); in ZipTraceFile()
428 zipCloseFileInZip(zipFile); in ZipTraceFile()
429 zipClose(zipFile, nullptr); in ZipTraceFile()
/base/global/resource_management/frameworks/resmgr/test/unittest/common/
H A Dhap_parser_test.cpp209 std::string zipFile = FormatFullPath("not_exist_all.hap"); in HWTEST_F() local
212 int32_t ret = HapParser::ReadIndexFromFile(zipFile.c_str(), buffer, len); in HWTEST_F()
223 std::string zipFile = FormatFullPath(g_hapPath); in HWTEST_F() local
226 int32_t ret = HapParser::ReadIndexFromFile(zipFile.c_str(), buffer, len); in HWTEST_F()
237 std::string zipFile = FormatFullPath(HAP_PATH_FA); in HWTEST_F() local
240 int32_t ret = HapParser::ReadIndexFromFile(zipFile.c_str(), buffer, len); in HWTEST_F()
/base/hiviewdfx/hiview/base/utility/include/
H A Dhiview_zip_util.h43 zipFile zipFile_ { nullptr };
/base/update/packaging_tools/zipalign/src/main/java/com/ohos/
H A DZipAlign.java105 private static List<String> getEntryNamesFromZip(ZipFile zipFile) { in getEntryNamesFromZip() argument
107 for (Enumeration e = zipFile.entries(); e.hasMoreElements();) { in getEntryNamesFromZip()
/base/update/sys_installer/tools/zipalign/src/main/java/com/ohos/
H A DZipAlign.java106 private static List<String> getEntryNamesFromZip(ZipFile zipFile) { in getEntryNamesFromZip() argument
108 for (Enumeration e = zipFile.entries(); e.hasMoreElements();) { in getEntryNamesFromZip()
/base/startup/appspawn/service/hnp/pack/src/
H A Dhnp_pack.c29 static int AddHnpCfgFileToZip(zipFile zf, const char *hnpSrcPath, HnpCfgInfo *hnpCfg) in AddHnpCfgFileToZip()
86 zipFile zf = zipOpen(hnp_file_path, APPEND_STATUS_CREATE); in PackHnp()
/base/hiviewdfx/hiview/plugins/event_store/event_export/task/export/
H A Dexport_json_file_writer.cpp335 auto zipFile = GetZipFile(exportDir_); in Write() local
336 HIVIEW_LOGD("zipFile: %{public}s", StringUtil::HideDeviceIdInfo(zipFile).c_str()); in Write()
338 exportJsonFileZippedListener_(tmpZipFile, zipFile); in Write()
/base/global/resource_management/frameworks/resmgr/include/
H A Dhap_parser.h51 * @param zipFile hap file path
56 static int32_t ReadIndexFromFile(const char *zipFile, std::unique_ptr<uint8_t[]> &buffer, size_t &bufLen);
/base/update/updater/utils/
H A Dutils.cpp464 void CompressFiles(std::vector<std::string> &files, const std::string &zipFile) in CompressFiles() argument
466 (void)DeleteFile(zipFile); in CompressFiles()
476 int32_t ret = CreateCompressLogFile(zipFile, zipFiles); in CompressFiles()
478 LOG(WARNING) << "CompressFiles failed: " << zipFile; in CompressFiles()
483 SetFileAttributes(zipFile, USER_UPDATE_AUTHORITY, GROUP_SYS_AUTHORITY, mode); in CompressFiles()
/base/update/updater/utils/include/
H A Dutils.h79 void CompressFiles(std::vector<std::string> &files, const std::string &zipFile);
/base/global/resource_management/frameworks/resmgr/src/utils/
H A Dhap_parser.cpp199 int32_t HapParser::ReadIndexFromFile(const char *zipFile, std::unique_ptr<uint8_t[]> &buffer, in ReadIndexFromFile() argument
202 unzFile uf = unzOpen64(zipFile); in ReadIndexFromFile()
204 RESMGR_HILOGE(RESMGR_TAG, "Error open %{public}s in ReadIndexFromFile %{public}d", zipFile, errno); in ReadIndexFromFile()

Completed in 13 milliseconds