AgateLib.Utility.ZipFileProvider Class Reference

TgzFileProvider implements IFileProvider and provides read access to zip file archives. This provides basic support for reading files from a compressed archive external to the application. The only compression method supported by ZipFileProvider is the deflate method, so you must make sure that any compressed data in the zip file is compressed with deflate. More...

Inheritance diagram for AgateLib.Utility.ZipFileProvider:

AgateLib.IFileProvider

List of all members.

Classes

class  FileHeader
class  ZipFileEntryStream

Public Member Functions

 ZipFileProvider (string filename)
 Constructs a ZipFileProvider to read from the specified archive.
 ZipFileProvider (string name, byte[] bytes)
 Constructs a ZipFileProvider to read from the specified archive from archive data loaded into a byte array. This overload is useful for a zip file embedded as a resource.
 ZipFileProvider (string name, Stream fileStream)
 Constructs a ZipFileProvider to read from the specified archive.
Stream OpenRead (string filename)
 Opens the specified file in the archive for reading.
bool FileExists (string filename)
 Returns true if the specified file exists in the archive.
IEnumerable< string > GetAllFiles ()
 Enumerates all files in the archive.
IEnumerable< string > GetAllFiles (string searchPattern)
 Enumerates all files matching the pattern.


Detailed Description

TgzFileProvider implements IFileProvider and provides read access to zip file archives. This provides basic support for reading files from a compressed archive external to the application. The only compression method supported by ZipFileProvider is the deflate method, so you must make sure that any compressed data in the zip file is compressed with deflate.


Constructor & Destructor Documentation

AgateLib.Utility.ZipFileProvider.ZipFileProvider ( string  filename  ) 

Constructs a ZipFileProvider to read from the specified archive.

Parameters:
filename 

AgateLib.Utility.ZipFileProvider.ZipFileProvider ( string  name,
byte[]  bytes 
)

Constructs a ZipFileProvider to read from the specified archive from archive data loaded into a byte array. This overload is useful for a zip file embedded as a resource.

Parameters:
name 
bytes 

AgateLib.Utility.ZipFileProvider.ZipFileProvider ( string  name,
Stream  fileStream 
)

Constructs a ZipFileProvider to read from the specified archive.

Parameters:
name A name used to identify this stream in debugging information.
fileStream A stream containing the data. This stream must support seeking.


Member Function Documentation

bool AgateLib.Utility.ZipFileProvider.FileExists ( string  filename  ) 

Returns true if the specified file exists in the archive.

Parameters:
filename 
Returns:

Implements AgateLib.IFileProvider.

IEnumerable<string> AgateLib.Utility.ZipFileProvider.GetAllFiles ( string  searchPattern  ) 

Enumerates all files matching the pattern.

Parameters:
searchPattern 
Returns:

Implements AgateLib.IFileProvider.

IEnumerable<string> AgateLib.Utility.ZipFileProvider.GetAllFiles (  ) 

Enumerates all files in the archive.

Returns:

Implements AgateLib.IFileProvider.

Stream AgateLib.Utility.ZipFileProvider.OpenRead ( string  filename  ) 

Opens the specified file in the archive for reading.

Parameters:
filename 
Returns:

Implements AgateLib.IFileProvider.


The documentation for this class was generated from the following file:
AgateLib
Awesome Game and Tool Engine Library
SourceForge.net Logo