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

#include <zipFile.h>

Classes

class  FileInfo
 
class  Iterator
 

Public Member Functions

USD_API UsdZipFile ()
 Create an invalid UsdZipFile object. More...
 
USD_API ~UsdZipFile ()
 
USD_API operator bool () const
 Return true if this object is valid, false otherwise. More...
 
USD_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...
 
USD_API Iterator end () const
 Returns end iterator for this zip archive. More...
 
Iterator cend () const
 Returns end iterator for this zip archive. More...
 
USD_API Iterator Find (const std::string &path) const
 
USD_API void DumpContents () const
 

Static Public Member Functions

static USD_API UsdZipFile Open (const std::string &filePath)
 
static USD_API UsdZipFile 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 56 of file zipFile.h.

Constructor & Destructor Documentation

USD_API UsdZipFile::UsdZipFile ( )

Create an invalid UsdZipFile object.

USD_API UsdZipFile::~UsdZipFile ( )

Member Function Documentation

USD_API Iterator UsdZipFile::begin ( ) const

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

Iterator UsdZipFile::cbegin ( ) const
inline

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

Definition at line 198 of file zipFile.h.

Iterator UsdZipFile::cend ( ) const
inline

Returns end iterator for this zip archive.

Definition at line 205 of file zipFile.h.

USD_API void UsdZipFile::DumpContents ( ) const

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

USD_API Iterator UsdZipFile::end ( ) const

Returns end iterator for this zip archive.

USD_API Iterator UsdZipFile::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 USD_API UsdZipFile UsdZipFile::Open ( const std::string filePath)
static

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

static USD_API UsdZipFile UsdZipFile::Open ( const std::shared_ptr< ArAsset > &  asset)
static

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

USD_API UsdZipFile::operator bool ( ) const
inlineexplicit

Return true if this object is valid, false otherwise.

Definition at line 81 of file zipFile.h.


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