Table of Contents

TZippyReader Class

Simple class for reading the contents of a zip file. It can read from multiple files at the same time, but not multithreaded.

Syntax

Namespace: FlexCel.Core

public class TZippyReader: IDisposable

Constructors

Name Description
TZippyReader Overloaded
TZippyReader
TZippyReader(Boolean)

Methods

Name Description
Open Overloaded
Open(String)
Open(Stream, Boolean)
TryOpen Tries to open a zip file and load the contents. If the file is invalid no Exception will be thrown. Note that other exceptions like a disk read error will still be raised. You can use this method instead of "if (​TZippy​Reader.​IsZip​Valid(​stream)​) TZippyReader.​Open(​stream)​" as it will be faster because it doesn't have to read the file twice.
Close Frees the memory associated with the object, and if this class owns the stream, it will free the associated stream too.
ExtractFile Overloaded
ExtractFile(String, String)
ExtractFile(Int32, String)
CopyStream Utility method. Copies the stream from input to output.
FileCount Returns the number of files inside the zip file, including files in all folders.
FileExists Returns true if a file exists inside the zip file.
GetFile Overloaded
GetFile(String)
GetFile(Int32)
GetFileInfo Overloaded
GetFileInfo(Int32)
GetFileInfo(String)
GetFileName Returns the filename for the file at position Index.
IsZipValid Overloaded
IsZipValid(String)
IsZipValid(Stream)
ExtractFileName Returns the filename part of a full zip path. For example, if aFileName is 'test/​test2/​file1.​zip' this method will return 'file1.zip'
ExtractFilePath Returns the path part of a full zip path, including the trailing slash. For example, if aFileName is 'test/​test2/​file1.​zip' this method will return 'test/test2/'
Dispose Overloaded
Dispose
Dispose(Boolean)