bit7z 4.1.0
A C++ library for interfacing with the 7-zip shared libs.
Loading...
Searching...
No Matches
bitarchiveitem.hpp
1/*
2 * bit7z - A C++ static library to interface with the 7-zip shared libraries.
3 * Copyright (c) Riccardo Ostani - All Rights Reserved.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
8 */
9
10#ifndef BITARCHIVEITEM_HPP
11#define BITARCHIVEITEM_HPP
12
13#include "bitdefines.hpp"
14#include "bitgenericitem.hpp"
15#include "bitpropvariant.hpp"
16#include "bittypes.hpp"
17
18#include <cstdint>
19
20namespace bit7z {
21
25class BitArchiveItem : public BitGenericItem {
26 public:
30 BIT7Z_NODISCARD auto index() const noexcept -> std::uint32_t;
31
35 BIT7Z_NODISCARD auto isDir() const -> bool final;
36
41 BIT7Z_NODISCARD auto isSymLink() const -> bool final;
42
47 BIT7Z_NODISCARD auto name() const -> tstring final;
48
55 BIT7Z_NODISCARD auto nativeName() const -> native_string;
56
61 BIT7Z_NODISCARD auto extension() const -> tstring;
62
67 BIT7Z_NODISCARD auto path() const -> tstring final;
68
75 BIT7Z_NODISCARD auto nativePath() const -> native_string;
76
83 BIT7Z_NODISCARD auto rawPath() const -> sevenzip_string;
84
88 BIT7Z_NODISCARD auto size() const -> std::uint64_t final;
89
93 BIT7Z_NODISCARD auto creationTime() const -> time_type;
94
98 BIT7Z_NODISCARD auto lastAccessTime() const -> time_type;
99
103 BIT7Z_NODISCARD auto lastWriteTime() const -> time_type;
104
108 BIT7Z_NODISCARD auto attributes() const -> std::uint32_t final;
109
113 BIT7Z_NODISCARD auto packSize() const -> std::uint64_t;
114
118 BIT7Z_NODISCARD auto crc() const -> std::uint32_t;
119
123 BIT7Z_NODISCARD auto isEncrypted() const -> bool;
124
125 protected:
126 explicit BitArchiveItem( std::uint32_t itemIndex ) noexcept;
127
128 private:
129 std::uint32_t mItemIndex;
130
131 friend class BitArchiveItemOffset;
132};
133
134} // namespace bit7z
135
136#endif // BITARCHIVEITEM_HPP
auto crc() const -> std::uint32_t
auto path() const -> tstring final
auto creationTime() const -> time_type
auto size() const -> std::uint64_t final
auto packSize() const -> std::uint64_t
auto nativePath() const -> native_string
auto rawPath() const -> sevenzip_string
auto isDir() const -> bool final
auto isEncrypted() const -> bool
auto lastAccessTime() const -> time_type
auto index() const noexcept -> std::uint32_t
auto nativeName() const -> native_string
auto isSymLink() const -> bool final
auto attributes() const -> std::uint32_t final
auto lastWriteTime() const -> time_type
auto extension() const -> tstring
auto name() const -> tstring final
The main namespace of the bit7z library.
Definition bit7zlibrary.hpp:29
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