Go to the source code of this file.
Classes | |
struct | nix::TarArchive |
Functions | |
int | nix::getArchiveFilterCodeByName (const std::string &method) |
Get filter_code from its name. | |
void | nix::unpackTarfile (Source &source, const std::filesystem::path &destDir) |
void | nix::unpackTarfile (const std::filesystem::path &tarFile, const std::filesystem::path &destDir) |
time_t | nix::unpackTarfileToSink (TarArchive &archive, ExtendedFileSystemObjectSink &parseSink) |
int nix::getArchiveFilterCodeByName | ( | const std::string & | method | ) |
Get filter_code from its name.
libarchive does not provide a convenience function like archive_write_add_filter_by_name but for reading. Instead it's necessary to use this kludge to convert method -> code and then use archive_read_support_filter_by_code. Arguably this is better than hand-rolling the equivalent function that is better implemented in libarchive.