Class ZipEntryFactory
Basic implementation of IEntryFactory
Inheritance
Implements
Inherited Members
Namespace: ICSharpCode.SharpZipLib.Zip
Assembly: ICSharpCode.SharpZipLib.dll
Syntax
public class ZipEntryFactory : IEntryFactory
Constructors
| Improve this Doc View SourceZipEntryFactory()
Initialise a new instance of the ZipEntryFactory class.
Declaration
public ZipEntryFactory()
Remarks
A default INameTransform, and the LastWriteTime for files is used.
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. |
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 SourceFixedDateTime
Declaration
public DateTime FixedDateTime { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
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.
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 |
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.
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.
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 SourceMakeDirectoryEntry(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. |
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. |
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 |
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 |
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 |