C++ Utilities: io/archive.h File Reference

C++ Utilities 5.34.1 Useful C++ classes and routines such as argument parser, IO and conversion utilities

Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Enumerations | Functions
archive.h File Reference
`#include "../chrono/datetime.h"`
`#include "../global.h"`
`#include <functional>`
`#include <map>`
`#include <stdexcept>`
`#include <string>`
`#include <string_view>`
`#include <vector>`
Include dependency graph for archive.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
class | CppUtilities::ArchiveException
| The ArchiveException class is thrown by the various archiving-related functions of this library when a conversion error occurs. More...
struct | CppUtilities::ArchiveFile
| The ArchiveFile class holds data about a file within an archive. More...

## Namespaces
namespace | CppUtilities
| Contains all utilities provided by the c++utilities library.

## Typedefs
using | CppUtilities::FileMap = std::map<std::string, std::vector<ArchiveFile>>
| A map of files extracted from an archive. Keys represent directories and values files within those directories.
using | CppUtilities::FilePredicate = std::function<bool(const char *, const char *, mode_t)>
| A function that is invoked for each file within an archive. If it returns true, the file is considered; otherwise the file is ignored.
using | CppUtilities::DirectoryHandler = std::function<bool(std::string_view path)>
| A function that is invoked by the walk-through-functions to return a directory.
using | CppUtilities::FileHandler = std::function<bool(std::string_view path, ArchiveFile &&file)>
| A function that is invoked by the walk-through-functions to return a file.

## Enumerations
enum class | CppUtilities::ArchiveFileType { CppUtilities::Regular , CppUtilities::Link }
| The ArchiveFileType enum specifies the type of a file within an archive. More...

## Functions
CPP_UTILITIES_EXPORT FileMap | CppUtilities::extractFiles (std::string_view archivePath, const FilePredicate &isFileRelevant)
| Extracts the specified archive.
CPP_UTILITIES_EXPORT void | CppUtilities::walkThroughArchive (std::string_view archivePath, const FilePredicate &isFileRelevant, FileHandler &&fileHandler, DirectoryHandler &&directoryHandler)
| Invokes callbacks for files and directories in the specified archive.
CPP_UTILITIES_EXPORT FileMap | CppUtilities::extractFilesFromBuffer (std::string_view archiveData, std::string_view archiveName, const FilePredicate &isFileRelevant)
| Extracts the specified archive.
CPP_UTILITIES_EXPORT void | CppUtilities::walkThroughArchiveFromBuffer (std::string_view archiveData, std::string_view archiveName, const FilePredicate &isFileRelevant, FileHandler &&fileHandler, DirectoryHandler &&directoryHandler)
| Invokes callbacks for files and directories in the specified archive.