#include <XrdClZipArchive.hh>
|
| ZipArchive (bool enablePlugIns=true) |
| Constructor. More...
|
|
virtual | ~ZipArchive () |
| Destructor. More...
|
|
XRootDStatus | OpenArchive (const std::string &url, OpenFlags::Flags flags, ResponseHandler *handler, uint16_t timeout=0) |
|
XRootDStatus | OpenFile (const std::string &fn, OpenFlags::Flags flags=OpenFlags::None, uint64_t size=0, uint32_t crc32=0) |
|
XRootDStatus | Read (uint64_t offset, uint32_t size, void *buffer, ResponseHandler *handler, uint16_t timeout=0) |
|
XRootDStatus | ReadFrom (const std::string &fn, uint64_t offset, uint32_t size, void *buffer, ResponseHandler *handler, uint16_t timeout=0) |
|
XRootDStatus | Write (uint32_t size, const void *buffer, ResponseHandler *handler, uint16_t timeout=0) |
|
XRootDStatus | AppendFile (const std::string &fn, uint32_t crc32, uint32_t size, const void *buffer, ResponseHandler *handler, uint16_t timeout=0) |
|
XRootDStatus | Stat (const std::string &fn, StatInfo *&info) |
|
XRootDStatus | Stat (StatInfo *&info) |
|
XRootDStatus | GetCRC32 (const std::string &fn, uint32_t &cksum) |
|
XRootDStatus | CloseArchive (ResponseHandler *handler, uint16_t timeout=0) |
| Create the central directory at the end of ZIP archive and close it. More...
|
|
XRootDStatus | CloseFile () |
|
XRootDStatus | List (DirectoryList *&list) |
|
bool | IsOpen () |
|
bool | SetProperty (const std::string &name, const std::string &value) |
| Set property on the underlying File object. More...
|
|
◆ zipcache_t
Type that maps file name to its cache.
◆ OpenStages
Stages of opening and parsing a ZIP archive.
Enumerator |
---|
None | |
HaveEocdBlk | |
HaveZip64EocdlBlk | |
HaveZip64EocdBlk | |
HaveCdRecords | |
Done | |
Error | |
NotParsed | |
◆ ZipArchive()
XrdCl::ZipArchive::ZipArchive |
( |
bool |
enablePlugIns = true | ) |
|
◆ ~ZipArchive()
virtual XrdCl::ZipArchive::~ZipArchive |
( |
| ) |
|
|
virtual |
◆ AppendFile()
XRootDStatus XrdCl::ZipArchive::AppendFile |
( |
const std::string & |
fn, |
|
|
uint32_t |
crc32, |
|
|
uint32_t |
size, |
|
|
const void * |
buffer, |
|
|
ResponseHandler * |
handler, |
|
|
uint16_t |
timeout = 0 |
|
) |
| |
Create a new file in the ZIP archive and append the data
- Parameters
-
fn | : the name of the new file to be created |
crc32 | : the crc32 of the file |
size | : the size of the file |
buffer | : the buffer with the data |
handler | : user callback |
timeout | : operation timeout |
- Returns
- : the status of the operation
◆ Clear()
void XrdCl::ZipArchive::Clear |
( |
| ) |
|
|
inlineprivate |
◆ CloseArchive()
Create the central directory at the end of ZIP archive and close it.
- Parameters
-
handler | : user callback |
timeout | : operation timeout |
- Returns
- : the status of the operation
◆ CloseFile()
◆ Free()
template<typename Response >
static void XrdCl::ZipArchive::Free |
( |
XRootDStatus * |
st, |
|
|
Response * |
rsp |
|
) |
| |
|
inlinestaticprivate |
Free status and response.
◆ GetCD()
Get a buffer with central directory of the ZIP archive
- Returns
- : buffer with central directory
◆ GetCRC32()
XRootDStatus XrdCl::ZipArchive::GetCRC32 |
( |
const std::string & |
fn, |
|
|
uint32_t & |
cksum |
|
) |
| |
|
inline |
◆ IsOpen()
bool XrdCl::ZipArchive::IsOpen |
( |
| ) |
|
|
inline |
- Returns
- : true if ZIP archive has been successfully opened
◆ List()
List files in the ZIP archive
- Returns
- : the status of the operation
◆ make_stat() [1/2]
static StatInfo* XrdCl::ZipArchive::make_stat |
( |
const StatInfo & |
starch, |
|
|
uint64_t |
size |
|
) |
| |
|
inlinestaticprivate |
◆ make_stat() [2/2]
StatInfo* XrdCl::ZipArchive::make_stat |
( |
const std::string & |
fn | ) |
|
|
inlineprivate |
Create a StatInfo object for a given file within the ZIP archive.
- Parameters
-
- Returns
- : StatInfo object for the given file
◆ make_status()
◆ OpenArchive()
Open ZIP Archive (and parse the Central Directory)
- Parameters
-
url | : the URL of the ZIP archive |
flags | : open flags to be used when openning the file |
handler | : user callback |
timeout | : operation timeout |
- Returns
- : the status of the operation
◆ OpenFile()
Open a file within the ZIP Archive
- Parameters
-
fn | : file name to be opened |
flags | : open flags (either 'Read' or 'New | Write') |
size | : file size (to be included in the LFH) |
crc32 | : file crc32 (to be included in the LFH) |
- Returns
- : the status of the operation
◆ OpenOnly()
Open the ZIP archive in read-only mode without parsing the central directory.
- Parameters
-
url | : url of the ZIP archive |
handler | : user callback |
timeout | : operation timeout |
- Returns
- : operation status
◆ PkgRsp()
template<typename Response >
static AnyObject* XrdCl::ZipArchive::PkgRsp |
( |
Response * |
rsp | ) |
|
|
inlinestaticprivate |
◆ Read()
XRootDStatus XrdCl::ZipArchive::Read |
( |
uint64_t |
offset, |
|
|
uint32_t |
size, |
|
|
void * |
buffer, |
|
|
ResponseHandler * |
handler, |
|
|
uint16_t |
timeout = 0 |
|
) |
| |
|
inline |
Read data from an open file
- Parameters
-
offset | : offset within the file to read at |
size | : number of bytes to be read |
buffer | : the buffer for the data |
handler | : user callback |
timeout | : operation timeout |
- Returns
- : the status of the operation
References XrdCl::errInvalidOp, XrdCl::ReadFrom(), and XrdCl::stError.
◆ ReadFrom()
XRootDStatus XrdCl::ZipArchive::ReadFrom |
( |
const std::string & |
fn, |
|
|
uint64_t |
offset, |
|
|
uint32_t |
size, |
|
|
void * |
buffer, |
|
|
ResponseHandler * |
handler, |
|
|
uint16_t |
timeout = 0 |
|
) |
| |
Read data from a given file
- Parameters
-
fn | : the name of the file from which we are going to read |
offset | : offset within the file to read at |
size | : number of bytes to be read |
buffer | : the buffer for the data |
handler | : user callback |
timeout | : operation timeout |
- Returns
- : the status of the operation
◆ Schedule()
template<typename Response >
◆ SetCD()
void XrdCl::ZipArchive::SetCD |
( |
const buffer_t & |
buffer | ) |
|
|
private |
Set central directory for the ZIP archive
- Parameters
-
buffer | : a buffer with the central directory to be set |
◆ SetProperty()
bool XrdCl::ZipArchive::SetProperty |
( |
const std::string & |
name, |
|
|
const std::string & |
value |
|
) |
| |
|
inline |
Set property on the underlying File object.
◆ Stat() [1/2]
◆ Stat() [2/2]
◆ Write()
Append data to a new file
- Parameters
-
size | : number of bytes to be appended |
buffer | : the buffer with the data to be appended |
handler | : user callback |
timeout | : operation timeout |
- Returns
- : the status of the operation
References XrdCl::errInvalidOp, and XrdCl::stError.
◆ WriteImpl()
Append data to a new file, implementation
- Parameters
-
lfh | : the Local File Header record |
size | : number of bytes to be appended |
buffer | : the buffer with the data to be appended |
handler | : user callback |
timeout | : operation timeout |
- Returns
- : the status of the operation
◆ ::MicroTest
◆ XrdEc::OpenOnlyImpl
◆ XrdEc::Reader
◆ XrdEc::StrmWriter
◆ archive
File XrdCl::ZipArchive::archive |
|
private |
◆ archsize
uint64_t XrdCl::ZipArchive::archsize |
|
private |
◆ buffer
std::unique_ptr<char[]> XrdCl::ZipArchive::buffer |
|
private |
◆ cdexists
bool XrdCl::ZipArchive::cdexists |
|
private |
◆ cdmap
◆ cdoff
uint64_t XrdCl::ZipArchive::cdoff |
|
private |
◆ cdvec
◆ eocd
std::unique_ptr<EOCD> XrdCl::ZipArchive::eocd |
|
private |
◆ lfh
std::unique_ptr<LFH> XrdCl::ZipArchive::lfh |
|
private |
◆ openfn
std::string XrdCl::ZipArchive::openfn |
|
private |
◆ openstage
◆ orgcdbuf
◆ orgcdcnt
uint32_t XrdCl::ZipArchive::orgcdcnt |
|
private |
◆ orgcdsz
uint32_t XrdCl::ZipArchive::orgcdsz |
|
private |
◆ updated
bool XrdCl::ZipArchive::updated |
|
private |
◆ zip64eocd
std::unique_ptr<ZIP64_EOCD> XrdCl::ZipArchive::zip64eocd |
|
private |
◆ zipcache
The documentation for this class was generated from the following file: