10#ifndef BITINPUTITEM_HPP
11#define BITINPUTITEM_HPP
14#include "bitinputarchive.hpp"
19struct ISequentialInStream;
34struct FilesystemInputItem final {
35 SymlinkPolicy symlinkPolicy = SymlinkPolicy::Follow;
36#if defined( _MSC_VER ) && _MSC_VER <= 1900
37 explicit FilesystemInputItem( SymlinkPolicy policy ) : symlinkPolicy{ policy } {}
41using BufferInputItem = std::reference_wrapper< const buffer_t >;
43using StdInputItem = std::reference_wrapper< std::istream >;
45struct RenamedInputItemInitTag final {};
47struct RenamedInputItem final {
48 explicit RenamedInputItem( RenamedInputItemInitTag ) {}
51enum struct InputItemType : std::uint8_t {
52 Filesystem, Buffer, StdStream, RenamedItem
55struct InputItemProperties final {
57 FILETIME lastWriteTime;
58 FILETIME lastAccessTime;
59 FILETIME creationTime;
60 std::uint32_t attributes;
61 InputItemType inputType;
70class BitInputItem final {
75 const bit7zfs::path& itemPath,
80 BitInputItem(
const bit7zfs::path& searchPath,
const bit7zfs::directory_entry& entry,
SymlinkPolicy symlinkPolicy );
82 BitInputItem(
const buffer_t& buffer,
const tstring&
path );
92 auto isDir() const noexcept ->
bool;
104 auto
size() const noexcept -> std::uint64_t;
161 friend class BitOutputArchive;
162 friend class BitArchiveEditor;
168 auto getStream( ISequentialInStream** inStream,
bool storeOpenFiles ) const -> HRESULT;
170 detail::InputItemProperties mProperties;
177 detail::FilesystemInputItem mFilesystemItem;
178 detail::BufferInputItem mBufferItem;
179 detail::StdInputItem mStdItem;
180 detail::RenamedInputItem mRenamedItem;
The main namespace of the bit7z library.
Definition bit7zlibrary.hpp:29
SymlinkPolicy
Enumeration representing how an input item should deal with symbolic links.
Definition bitinputitem.hpp:26
@ DoNotFollow
Do not follow symbolic links, storing the link itself.
Definition bitinputitem.hpp:28
@ Follow
Follow symbolic links, storing the content of the pointed-to file.
Definition bitinputitem.hpp:27
BitProperty
The BitProperty enum represents the archive/item properties that 7-zip can read or write.
Definition bitpropvariant.hpp:32
std::wstring sevenzip_string
The string type used internally by 7-Zip.
Definition bittypes.hpp:69
std::basic_string< tchar > tstring
Definition bittypes.hpp:104
std::chrono::time_point< std::chrono::system_clock > time_type
A type representing a time point measured using the system clock.
Definition bitpropvariant.hpp:27
std::string native_string
Native string type of the system.
Definition bittypes.hpp:80
The BitPropVariant struct is a light extension to the WinAPI PROPVARIANT struct providing useful gett...
Definition bitpropvariant.hpp:161