11#include <OpenMS/config.h>
45 static void zipDirectory(
const std::string& directory_path,
const std::string& output_zip);
67 static std::string
unzipDirectory(
const std::string& input_path, std::unique_ptr<TempDir>& temp_dir);
84 static void addOrReplaceFromFile(
const std::string& archive_path,
const std::string& entry_name,
const std::string& source_file_path);
93 static std::vector<std::string>
listEntries(
const std::string& archive_path);
105 static bool listEntries(
const std::string& archive_path, std::vector<std::string>& entries);
145 static std::string
extractEntryToTempFile(
const std::string& archive_path,
const std::string& entry_name, std::unique_ptr<TempDir>& temp_dir);
161 static std::string
findSingleEntry(
const std::string& archive_path,
const std::string& extension);
Small libzip-based helpers for working with ZIP archives.
Definition ZipArchiveFile.h:32
static std::string findSingleEntry(const std::string &archive_path, const std::string &extension)
Find the one file in a zip archive whose name ends with extension.
static std::vector< std::string > listEntries(const std::string &archive_path)
List entries in a zip archive (returns empty list if not available)
static std::string extractEntryToTempFile(const std::string &archive_path, const std::string &entry_name, std::unique_ptr< TempDir > &temp_dir)
Extract a single entry from a zip archive into a temporary file and return its path.
static bool listEntries(const std::string &archive_path, std::vector< std::string > &entries)
List entries in a zip archive, and tell whether the archive could be read.
static void zipDirectory(const std::string &directory_path, const std::string &output_zip)
Create a store-only zip archive from a directory (no additional compression)
static void writeSidecarIndex(const std::string &archive_path)
Write a small JSON sidecar index for the archive listing entries and sizes.
static std::string unzipDirectory(const std::string &input_path, std::unique_ptr< TempDir > &temp_dir)
Unpack a zip archive into a temporary directory and return the usable path.
static void addOrReplaceFromFile(const std::string &archive_path, const std::string &entry_name, const std::string &source_file_path)
Add or replace an entry inside an existing zip archive from a file on disk.
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19