Show / Hide Table of Contents

Class ZipEntryFactory

Basic implementation of IEntryFactory

Inheritance
System.Object
ZipEntryFactory
Implements
IEntryFactory
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ICSharpCode.SharpZipLib.Zip
Assembly: ICSharpCode.SharpZipLib.dll
Syntax
public class ZipEntryFactory : IEntryFactory

Constructors

| Improve this Doc View Source

ZipEntryFactory()

Initialise a new instance of the ZipEntryFactory class.

Declaration
public ZipEntryFactory()
Remarks

A default INameTransform, and the LastWriteTime for files is used.

| Improve this Doc View Source

ZipEntryFactory(ZipEntryFactory.TimeSetting)

Initialise a new instance of ZipEntryFactory using the specified ZipEntryFactory.TimeSetting

Declaration
public ZipEntryFactory(ZipEntryFactory.TimeSetting timeSetting)
Parameters
Type Name Description
ZipEntryFactory.TimeSetting timeSetting

The time setting to use when creating Zip entries.

| Improve this Doc View Source

ZipEntryFactory(DateTime)

Initialise a new instance of ZipEntryFactory using the specified System.DateTime

Declaration
public ZipEntryFactory(DateTime time)
Parameters
Type Name Description
System.DateTime time

The time to set all DateTime values to.

Properties

| Improve this Doc View Source

FixedDateTime

Get / set the System.DateTime value to use when Setting is set to Fixed

Declaration
public DateTime FixedDateTime { get; set; }
Property Value
Type Description
System.DateTime
| Improve this Doc View Source

GetAttributes

A bitmask defining the attributes to be retrieved from the actual file.

Declaration
public int GetAttributes { get; set; }
Property Value
Type Description
System.Int32
Remarks

The default is to get all possible attributes from the actual file.

| Improve this Doc View Source

IsUnicodeText

Get set a value indicating whether unicode text should be set on.

Declaration
public bool IsUnicodeText { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

NameTransform

Get / set the INameTransform to be used when creating new ZipEntry values.

Declaration
public INameTransform NameTransform { get; set; }
Property Value
Type Description
INameTransform
Remarks

Setting this property to null will cause a default name transform to be used.

| Improve this Doc View Source

SetAttributes

A bitmask defining which attributes are to be set on.

Declaration
public int SetAttributes { get; set; }
Property Value
Type Description
System.Int32
Remarks

By default no attributes are set on.

| Improve this Doc View Source

Setting

Get / set the ZipEntryFactory.TimeSetting in use.

Declaration
public ZipEntryFactory.TimeSetting Setting { get; set; }
Property Value
Type Description
ZipEntryFactory.TimeSetting

Methods

| Improve this Doc View Source

MakeDirectoryEntry(String)

Make a new ZipEntry for a directory.

Declaration
public ZipEntry MakeDirectoryEntry(string directoryName)
Parameters
Type Name Description
System.String directoryName

The raw untransformed name for the new directory

Returns
Type Description
ZipEntry

Returns a new ZipEntry representing a directory.

| Improve this Doc View Source

MakeDirectoryEntry(String, Boolean)

Make a new ZipEntry for a directory.

Declaration
public ZipEntry MakeDirectoryEntry(string directoryName, bool useFileSystem)
Parameters
Type Name Description
System.String directoryName

The raw untransformed name for the new directory

System.Boolean useFileSystem

If true entry detail is retrieved from the file system if the file exists.

Returns
Type Description
ZipEntry

Returns a new ZipEntry representing a directory.

| Improve this Doc View Source

MakeFileEntry(String)

Make a new ZipEntry for a file.

Declaration
public ZipEntry MakeFileEntry(string fileName)
Parameters
Type Name Description
System.String fileName

The name of the file to create a new entry for.

Returns
Type Description
ZipEntry

Returns a new ZipEntry based on the fileName.

| Improve this Doc View Source

MakeFileEntry(String, Boolean)

Make a new ZipEntry for a file.

Declaration
public ZipEntry MakeFileEntry(string fileName, bool useFileSystem)
Parameters
Type Name Description
System.String fileName

The name of the file to create a new entry for.

System.Boolean useFileSystem

If true entry detail is retrieved from the file system if the file exists.

Returns
Type Description
ZipEntry

Returns a new ZipEntry based on the fileName.

| Improve this Doc View Source

MakeFileEntry(String, String, Boolean)

Make a new ZipEntry from a name.

Declaration
public ZipEntry MakeFileEntry(string fileName, string entryName, bool useFileSystem)
Parameters
Type Name Description
System.String fileName

The name of the file to create a new entry for.

System.String entryName

An alternative name to be used for the new entry. Null if not applicable.

System.Boolean useFileSystem

If true entry detail is retrieved from the file system if the file exists.

Returns
Type Description
ZipEntry

Returns a new ZipEntry based on the fileName.

Implements

IEntryFactory
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2000-2022 SharpZipLib Contributors