Nebula
Loading...
Searching...
No Matches
IO::ZipFileEntry Class Reference

#include <zipfileentry.h>

Detailed Description

A file entry in a zip archive.

The ZipFileEntry class is thread-safe, all public methods can be invoked from on the same object from different threads.

Public Member Functions

 ZipFileEntry ()
 constructor
 
 ~ZipFileEntry ()
 destructor
 
const Util::StringAtomGetName () const
 get name of the file entry
 
IO::Stream::Size GetFileSize () const
 get the uncompressed file size in bytes
 
bool Open (const Util::String &password="")
 open the zip file
 
void Close ()
 close the zip file
 
bool Read (void *buf, IO::Stream::Size bufSize) const
 read the entire content into the provided memory buffer
 

Private Member Functions

void Setup (const Util::StringAtom &name, unzFile zipFileHandle, Threading::CriticalSection *critSect)
 setup the file entry object
 

Private Attributes

Threading::CriticalSectionarchiveCritSect
 
Util::StringAtom name
 
unzFile zipFileHandle
 
unz64_file_pos filePosInfo
 
uint64_t uncompressedSize
 

Friends

class ZipArchive
 

Constructor & Destructor Documentation

◆ ZipFileEntry()

IO::ZipFileEntry::ZipFileEntry ( )

constructor

◆ ~ZipFileEntry()

IO::ZipFileEntry::~ZipFileEntry ( )

destructor

Member Function Documentation

◆ Close()

void IO::ZipFileEntry::Close ( )

close the zip file

◆ GetFileSize()

IO::Stream::Size IO::ZipFileEntry::GetFileSize ( ) const
inline

get the uncompressed file size in bytes

◆ GetName()

const Util::StringAtom & IO::ZipFileEntry::GetName ( ) const
inline

get name of the file entry

◆ Open()

bool IO::ZipFileEntry::Open ( const Util::String & password = "")

open the zip file

◆ Read()

bool IO::ZipFileEntry::Read ( void * buf,
IO::Stream::Size bufSize ) const

read the entire content into the provided memory buffer

◆ Setup()

void IO::ZipFileEntry::Setup ( const Util::StringAtom & name,
unzFile zipFileHandle,
Threading::CriticalSection * critSect )
private

setup the file entry object

Friends And Related Symbol Documentation

◆ ZipArchive

friend class ZipArchive
friend

Member Data Documentation

◆ archiveCritSect

Threading::CriticalSection* IO::ZipFileEntry::archiveCritSect
private

◆ filePosInfo

unz64_file_pos IO::ZipFileEntry::filePosInfo
private

◆ name

Util::StringAtom IO::ZipFileEntry::name
private

◆ uncompressedSize

uint64_t IO::ZipFileEntry::uncompressedSize
private

◆ zipFileHandle

unzFile IO::ZipFileEntry::zipFileHandle
private

The documentation for this class was generated from the following files: