10#ifndef BITITEMSVECTOR_HPP
11#define BITITEMSVECTOR_HPP
13#include "bitabstractarchivehandler.hpp"
15#include "bitinputitem.hpp"
16#include "bittypes.hpp"
24struct IndexingOptions {
26 bool recursive =
true;
27 bool retainFolderStructure =
false;
28 bool onlyFiles =
false;
52 IndexingOptions options = {}
69 IndexingOptions options = {}
96 IndexingOptions options = {}
114 IndexingOptions options = {}
The main namespace of the bit7z library.
Definition bit7zlibrary.hpp:29
void indexDirectory(BitItemsVector &outVector, const tstring &inDir, const tstring &filter={}, IndexingOptions options={})
Indexes the given directory, adding to the vector all the files that match the wildcard filter.
SymlinkPolicy
Enumeration representing how an input item should deal with symbolic links.
Definition bitinputitem.hpp:26
@ Follow
Follow symbolic links, storing the content of the pointed-to file.
Definition bitinputitem.hpp:27
std::vector< BitInputItem > BitItemsVector
A vector of items to be compressed into an archive.
Definition bititemsvector.hpp:36
void indexFile(BitItemsVector &outVector, const tstring &inFile, const tstring &name={}, SymlinkPolicy symlinkPolicy=SymlinkPolicy::Follow)
Indexes the given file path, with an optional user-defined path to be used in output archives.
void indexPathsMap(BitItemsVector &outVector, const std::map< tstring, tstring > &inPaths, IndexingOptions options={})
Indexes the given map of filesystem paths, adding to the vector all the files.
std::basic_string< tchar > tstring
Definition bittypes.hpp:104
FilterPolicy
Enumeration representing the policy according to which the archive handler should treat the items tha...
Definition bitabstractarchivehandler.hpp:112
void indexBuffer(BitItemsVector &outVector, const buffer_t &inBuffer, const tstring &name)
Indexes the given buffer, using the given name as a path when compressed in archives.
void indexPaths(BitItemsVector &outVector, const std::vector< tstring > &inPaths, IndexingOptions options={})
Indexes the given vector of filesystem paths, adding to the item vector all the files.
void indexDirectoryContent(BitItemsVector &outVector, const tstring &inDir, const tstring &filter={}, IndexingOptions options={})
Indexes the content of the given directory, adding to the vector all the files that match the wildcar...
void indexStream(BitItemsVector &outVector, std::istream &inStream, const tstring &name)
Indexes the given standard input stream, using the given name as a path when compressed in archives.