#include "../chrono/datetime.h"
#include "../global.h"
#include <functional>
#include <map>
#include <stdexcept>
#include <string>
#include <string_view>
#include <vector>
Go to the source code of this file.
|
namespace | CppUtilities |
| Contains all utilities provides by the c++utilities library.
|
|
|
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.
|
|
|
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.
|
|