HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SdfZipFile Class Reference

#include <zipFile.h>

Classes

class  FileInfo
 
class  Iterator
 

Public Member Functions

SDF_API SdfZipFile ()
 Create an invalid SdfZipFile object. More...
 
SDF_API ~SdfZipFile ()
 
SDF_API operator bool () const
 Return true if this object is valid, false otherwise. More...
 
SDF_API Iterator begin () const
 Returns iterator pointing to the first file in the zip archive. More...
 
Iterator cbegin () const
 Returns iterator pointing to the first file in the zip archive. More...
 
SDF_API Iterator end () const
 Returns end iterator for this zip archive. More...
 
Iterator cend () const
 Returns end iterator for this zip archive. More...
 
SDF_API Iterator Find (const std::string &path) const
 
SDF_API void DumpContents () const
 

Static Public Member Functions

static SDF_API SdfZipFile Open (const std::string &filePath)
 
static SDF_API SdfZipFile Open (const std::shared_ptr< ArAsset > &asset)
 

Detailed Description

Class for reading a zip file. This class is primarily intended to support the .usdz file format. It is not a general-purpose zip reader, as it does not implement the full zip file specification. In particular:

  • This class does not natively support decompressing data from a zip archive. Clients may access the data exactly as stored in the file and perform their own decompression if desired.
  • This class does not rely on the central directory in order to read the contents of the file. This allows it to operate on partial zip archives. However, this also means it may handle certain zip files incorrectly. For example, if a file was deleted from a zip archive by just removing its central directory header, that file will still be found by this class.

Definition at line 40 of file zipFile.h.

Constructor & Destructor Documentation

SDF_API SdfZipFile::SdfZipFile ( )

Create an invalid SdfZipFile object.

SDF_API SdfZipFile::~SdfZipFile ( )

Member Function Documentation

SDF_API Iterator SdfZipFile::begin ( ) const

Returns iterator pointing to the first file in the zip archive.

Iterator SdfZipFile::cbegin ( ) const
inline

Returns iterator pointing to the first file in the zip archive.

Definition at line 182 of file zipFile.h.

Iterator SdfZipFile::cend ( ) const
inline

Returns end iterator for this zip archive.

Definition at line 189 of file zipFile.h.

SDF_API void SdfZipFile::DumpContents ( ) const

Print out listing of contents of this zip archive to stdout. For diagnostic purposes only.

SDF_API Iterator SdfZipFile::end ( ) const

Returns end iterator for this zip archive.

SDF_API Iterator SdfZipFile::Find ( const std::string &  path) const

Returns iterator to the file with the given path in this zip archive, or end() if no such file exists.

static SDF_API SdfZipFile SdfZipFile::Open ( const std::string &  filePath)
static

Opens the zip archive at filePath. Returns invalid object on error.

static SDF_API SdfZipFile SdfZipFile::Open ( const std::shared_ptr< ArAsset > &  asset)
static

Opens the zip archive asset. Returns invalid object on error.

SDF_API SdfZipFile::operator bool ( ) const
inlineexplicit

Return true if this object is valid, false otherwise.

Definition at line 65 of file zipFile.h.


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