GTarParser Class Reference

Tar file parser. More...

#include <GTarFile.h>

List of all members.


struct  GTarFile
struct  GTarHdr
 The actual file format. More...

Public Member Functions

bool DirList (char *File, GArray< GTarFile > &Out)
 Get a directory listing of the tar file.
bool Extract (char *File, char *OutFolder)
 Extract all the tar file contents to a folder.

Protected Member Functions

int64 Octal (char *o)
 Convert octal number to decimal.
virtual bool Process (GTarFile &f, GStream &s, bool &SkipFile)
bool Parse (char *FileName, int Mode)
 Main parsing loop.

Protected Attributes

Zlib z
 The compression lib.
GZlibFile f
 The stream wrapper around the lib.
GArray< GTarFile > * Files
 If this is set, output files to array.
char * ExtractTo
 If this is set, then extract the files to this folder.

Detailed Description

Tar file parser.

Member Function Documentation

virtual bool GTarParser::Process ( GTarFile f,
GStream s,
bool &  SkipFile 
) [inline, protected, virtual]

Called every time a file is parsed

true if this function consumes the body of the file

References GTarParser::GTarFile::Blocks(), GTarParser::GTarFile::Dir, ExtractTo, Files, GTarParser::GTarFile::Name, GStream::Read(), GTarParser::GTarFile::Size, and GVariant::Str().

Referenced by Parse().

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

Generated on Wed Dec 1 15:41:04 2010 for Lgi by  doxygen