Horizon
|
Safe wrapper on the struct zip structure. More...
#include <zip.hpp>
Classes | |
class | iterator |
Base iterator class. More... | |
Public Types | |
using | value_type = libzip::stat |
Iterator conversion to Stat. | |
using | reference = libzip::stat |
Reference is a copy of Stat. | |
using | const_reference = libzip::stat |
Const reference is a copy of Stat. | |
using | pointer = stat_ptr |
Pointer is a small wrapper. | |
using | size_type = unsigned |
Type of difference. | |
using | const_iterator = iterator |
Const random access iterator. | |
using | value_type = libzip::stat |
Iterator conversion to Stat. | |
using | reference = libzip::stat |
Reference is a copy of Stat. | |
using | const_reference = libzip::stat |
Const reference is a copy of Stat. | |
using | pointer = stat_ptr |
Pointer is a small wrapper. | |
using | size_type = unsigned |
Type of difference. | |
using | const_iterator = iterator |
Const random access iterator. | |
Public Member Functions | |
archive (const std::string &path, flags_t flags=0) | |
Open an archive on the disk. More... | |
archive (archive &&other) noexcept=default | |
Move constructor defaulted. More... | |
archive & | operator= (archive &&other) noexcept=default |
Move operator defaulted. More... | |
iterator | begin () noexcept |
Get an iterator to the beginning. More... | |
const_iterator | begin () const noexcept |
Overloaded function. More... | |
const_iterator | cbegin () const noexcept |
Overloaded function. More... | |
iterator | end () noexcept |
Get an iterator to the end. More... | |
const_iterator | end () const noexcept |
Overloaded function. More... | |
const_iterator | cend () const noexcept |
Overloaded function. More... | |
void | set_file_comment (uint64_t index, const std::string &text="", flags_t flags=0) |
Set a comment on a file. More... | |
std::string | file_comment (uint64_t index, flags_t flags=0) const |
Get a comment from a file. More... | |
void | set_comment (const std::string &comment) |
Set the archive comment. More... | |
std::string | comment (flags_t flags=0) const |
Get the archive comment. More... | |
bool | exists (const std::string &name, flags_t flags=0) const noexcept |
Check if a file exists on the archive. More... | |
int64_t | find (const std::string &name, flags_t flags=0) const |
Locate a file on the archive. More... | |
libzip::stat | stat (const std::string &name, flags_t flags=0) const |
Get information about a file. More... | |
libzip::stat | stat (uint64_t index, flags_t flags=0) const |
Get information about a file. More... | |
int64_t | add (const source &source, const std::string &name, flags_t flags=0) |
Add a file to the archive. More... | |
int64_t | mkdir (const std::string &directory, flags_t flags=0) |
Create a directory in the archive. More... | |
void | replace (const source &source, uint64_t index, flags_t flags=0) |
Replace an existing file in the archive. More... | |
file | open (const std::string &name, flags_t flags=0, const std::string &password="") |
Open a file in the archive. More... | |
file | open (uint64_t index, flags_t flags=0, const std::string &password="") |
Open a file in the archive. More... | |
void | rename (uint64_t index, const std::string &name, flags_t flags=0) |
Rename an existing entry in the archive. More... | |
void | set_file_compression (uint64_t index, int32_t comp, uint32_t flags=0) |
Set file compression. More... | |
void | remove (uint64_t index) |
Delete a file from the archive. More... | |
int64_t | num_entries (flags_t flags=0) const noexcept |
Get the number of entries in the archive. More... | |
void | unchange (uint64_t index) |
Revert changes on the file. More... | |
void | unchange_all () |
Revert all changes. More... | |
void | unchange_archive () |
Revert changes to archive. More... | |
void | set_default_password (const std::string &password="") |
Set the defaut password. More... | |
void | set_flag (flags_t flag, int value) |
Set an archive flag. More... | |
int | flag (flags_t which, flags_t flags=0) const |
Get an archive flag. More... | |
archive (const std::string &path, flags_t flags=0) | |
Open an archive on the disk. More... | |
archive (archive &&other) noexcept=default | |
Move constructor defaulted. More... | |
archive & | operator= (archive &&other) noexcept=default |
Move operator defaulted. More... | |
iterator | begin () noexcept |
Get an iterator to the beginning. More... | |
const_iterator | begin () const noexcept |
Overloaded function. More... | |
const_iterator | cbegin () const noexcept |
Overloaded function. More... | |
iterator | end () noexcept |
Get an iterator to the end. More... | |
const_iterator | end () const noexcept |
Overloaded function. More... | |
const_iterator | cend () const noexcept |
Overloaded function. More... | |
void | set_file_comment (uint64_t index, const std::string &text="", flags_t flags=0) |
Set a comment on a file. More... | |
std::string | file_comment (uint64_t index, flags_t flags=0) const |
Get a comment from a file. More... | |
void | set_comment (const std::string &comment) |
Set the archive comment. More... | |
std::string | comment (flags_t flags=0) const |
Get the archive comment. More... | |
bool | exists (const std::string &name, flags_t flags=0) const noexcept |
Check if a file exists on the archive. More... | |
int64_t | find (const std::string &name, flags_t flags=0) const |
Locate a file on the archive. More... | |
libzip::stat | stat (const std::string &name, flags_t flags=0) const |
Get information about a file. More... | |
libzip::stat | stat (uint64_t index, flags_t flags=0) const |
Get information about a file. More... | |
int64_t | add (const source &source, const std::string &name, flags_t flags=0) |
Add a file to the archive. More... | |
int64_t | mkdir (const std::string &directory, flags_t flags=0) |
Create a directory in the archive. More... | |
void | replace (const source &source, uint64_t index, flags_t flags=0) |
Replace an existing file in the archive. More... | |
file | open (const std::string &name, flags_t flags=0, const std::string &password="") |
Open a file in the archive. More... | |
file | open (uint64_t index, flags_t flags=0, const std::string &password="") |
Open a file in the archive. More... | |
void | rename (uint64_t index, const std::string &name, flags_t flags=0) |
Rename an existing entry in the archive. More... | |
void | set_file_compression (uint64_t index, int32_t comp, uint32_t flags=0) |
Set file compression. More... | |
void | remove (uint64_t index) |
Delete a file from the archive. More... | |
int64_t | num_entries (flags_t flags=0) const noexcept |
Get the number of entries in the archive. More... | |
void | unchange (uint64_t index) |
Revert changes on the file. More... | |
void | unchange_all () |
Revert all changes. More... | |
void | unchange_archive () |
Revert changes to archive. More... | |
void | set_default_password (const std::string &password="") |
Set the defaut password. More... | |
void | set_flag (flags_t flag, int value) |
Set an archive flag. More... | |
int | flag (flags_t which, flags_t flags=0) const |
Get an archive flag. More... | |
Safe wrapper on the struct zip structure.
|
inline |
Open an archive on the disk.
path | the path |
flags | the optional flags |
std::runtime_error | on errors |
|
defaultnoexcept |
Move constructor defaulted.
other | the other archive |
|
inline |
Open an archive on the disk.
path | the path |
flags | the optional flags |
std::runtime_error | on errors |
|
defaultnoexcept |
Move constructor defaulted.
other | the other archive |
|
inline |
Add a file to the archive.
source | the source |
name | the name entry in the archive |
flags | the optional flags |
std::runtime_error | on errors |
|
inline |
Add a file to the archive.
source | the source |
name | the name entry in the archive |
flags | the optional flags |
std::runtime_error | on errors |
|
inlinenoexcept |
Overloaded function.
|
inlinenoexcept |
Overloaded function.
|
inlinenoexcept |
Get an iterator to the beginning.
|
inlinenoexcept |
Get an iterator to the beginning.
|
inlinenoexcept |
Overloaded function.
|
inlinenoexcept |
Overloaded function.
|
inlinenoexcept |
Overloaded function.
|
inlinenoexcept |
Overloaded function.
|
inline |
Get the archive comment.
flags | the optional flags |
std::runtime_error | on errors |
|
inline |
Get the archive comment.
flags | the optional flags |
std::runtime_error | on errors |
|
inlinenoexcept |
Overloaded function.
|
inlinenoexcept |
Overloaded function.
|
inlinenoexcept |
Get an iterator to the end.
|
inlinenoexcept |
Get an iterator to the end.
|
inlinenoexcept |
Check if a file exists on the archive.
name | the name |
flags | the optional flags |
|
inlinenoexcept |
Check if a file exists on the archive.
name | the name |
flags | the optional flags |
Get a comment from a file.
index | the file index in the archive |
flags | the optional flags |
std::runtime_error | on errors |
Get a comment from a file.
index | the file index in the archive |
flags | the optional flags |
std::runtime_error | on errors |
Locate a file on the archive.
name | the name |
flags | the optional flags |
std::runtime_error | on errors |
Locate a file on the archive.
name | the name |
flags | the optional flags |
std::runtime_error | on errors |
Get an archive flag.
which | which flag |
flags | the optional flags |
std::runtime_error | on errors |
Get an archive flag.
which | which flag |
flags | the optional flags |
std::runtime_error | on errors |
Create a directory in the archive.
directory | the directory name |
flags | the optional flags |
std::runtime_error | on errors |
Create a directory in the archive.
directory | the directory name |
flags | the optional flags |
std::runtime_error | on errors |
Get the number of entries in the archive.
flags | the optional flags |
Get the number of entries in the archive.
flags | the optional flags |
|
inline |
Open a file in the archive.
name | the name |
flags | the optional flags |
password | the optional password |
std::runtime_error | on errors |
|
inline |
Open a file in the archive.
name | the name |
flags | the optional flags |
password | the optional password |
std::runtime_error | on errors |
|
inline |
Open a file in the archive.
Overloaded function.
index | the file index in the archive |
flags | the optional flags |
password | the optional password |
std::runtime_error | on errors |
|
inline |
Open a file in the archive.
Overloaded function.
index | the file index in the archive |
flags | the optional flags |
password | the optional password |
std::runtime_error | on errors |
Move operator defaulted.
other | the other archive |
Move operator defaulted.
other | the other archive |
|
inline |
Delete a file from the archive.
index | the file index in the archive |
std::runtime_error | on errors |
|
inline |
Delete a file from the archive.
index | the file index in the archive |
std::runtime_error | on errors |
Rename an existing entry in the archive.
index | the file index in the archive |
name | the new name |
flags | the optional flags |
std::runtime_error | on errors |
Rename an existing entry in the archive.
index | the file index in the archive |
name | the new name |
flags | the optional flags |
std::runtime_error | on errors |
Replace an existing file in the archive.
source | the source |
index | the file index in the archiev |
flags | the optional flags |
std::runtime_error | on errors |
Replace an existing file in the archive.
source | the source |
index | the file index in the archiev |
flags | the optional flags |
std::runtime_error | on errors |
|
inline |
Set the archive comment.
comment | the comment |
std::runtime_error | on errors |
|
inline |
Set the archive comment.
comment | the comment |
std::runtime_error | on errors |
|
inline |
Set the defaut password.
password | the password or empty to unset it |
std::runtime_error | on errors |
|
inline |
Set the defaut password.
password | the password or empty to unset it |
std::runtime_error | on errors |
|
inline |
Set a comment on a file.
index | the file index in the archive |
text | the text or empty to remove the comment |
flags | the optional flags |
std::runtime_error | on errors |
|
inline |
Set a comment on a file.
index | the file index in the archive |
text | the text or empty to remove the comment |
flags | the optional flags |
std::runtime_error | on errors |
|
inline |
Set file compression.
index | the file index in the archive |
comp | the compression |
flags | the optional flags |
std::runtime_error | on errors |
|
inline |
Set file compression.
index | the file index in the archive |
comp | the compression |
flags | the optional flags |
std::runtime_error | on errors |
|
inline |
Set an archive flag.
flag | the flag to set |
value | the value |
std::runtime_error | on errors |
|
inline |
Set an archive flag.
flag | the flag to set |
value | the value |
std::runtime_error | on errors |
|
inline |
Get information about a file.
name | the name |
flags | the optional flags |
std::runtime_error | on errors |
|
inline |
Get information about a file.
name | the name |
flags | the optional flags |
std::runtime_error | on errors |
|
inline |
Get information about a file.
Overloaded function.
index | the file index in the archive |
flags | the optional flags |
std::runtime_error | on errors |
|
inline |
Get information about a file.
Overloaded function.
index | the file index in the archive |
flags | the optional flags |
std::runtime_error | on errors |
|
inline |
Revert changes on the file.
index | the index |
std::runtime_error | on errors |
|
inline |
Revert changes on the file.
index | the index |
std::runtime_error | on errors |
|
inline |
Revert all changes.
std::runtime_error | on errors |
|
inline |
Revert all changes.
std::runtime_error | on errors |
|
inline |
Revert changes to archive.
std::runtime_error | on errors |
|
inline |
Revert changes to archive.
std::runtime_error | on errors |