ZipEntryOptions Class
Options of a new entry of a ZipArchive. The properties that are null use the value of the ZipCompressionOptions of the archive.
public sealed class ZipEntryOptionsConstructors
| Name | Description |
|---|---|
| ZipEntryOptions() |
ZipEntryOptions()
public ZipEntryOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| Attributes | Gets or sets the MS-DOS attributes of the entry (the low 16 bits of the external attributes), or null for none, or FileAttributes.Directory for a directory. |
| Comment | Gets or sets the comment of the entry, or null. It is written as UTF-8 when it is not ASCII. |
| CompressionLevel | Gets or sets the compression level of the entry, or null for ZipCompressionOptions.CompressionLevel. |
| CompressionMethod | Gets or sets the compression method of the entry, or null for ZipCompressionOptions.CompressionMethod. |
| Encryption | Gets or sets the encryption of the entry, or null for ZipCompressionOptions.Encryption. It applies only when the entry has a password; ZipEncryption.None writes the entry without encryption. |
| LastWriteTime | Gets or sets the last time the entry was modified, or null for the current time. It is written as an MS-DOS time, in the local time zone and with a 2-second precision (as ZipArchive does), and as a Unix time in UTC, with a 1-second precision, in the extended timestamp extra field (0x5455). |
| Password | Gets or sets the password of the entry, or null for ZipCompressionOptions.Password. An empty string writes the entry without encryption, even when the archive has a password. |
| UnixFileMode | Gets or sets the Unix permissions of the entry, or null. When it is set, the entry is marked as created on Unix, and the high 16 bits of its external attributes are its mode: the file type and the permissions. |
Attributes
ZipEntryOptions.csGets or sets the MS-DOS attributes of the entry (the low 16 bits of the external attributes), or null for none, or FileAttributes.Directory for a directory.
public FileAttributes? Attributes { get; set; }Property value
Comment
ZipEntryOptions.csCompressionLevel
ZipEntryOptions.csGets or sets the compression level of the entry, or null for ZipCompressionOptions.CompressionLevel.
public CompressionLevel? CompressionLevel { get; set; }Property value
CompressionMethod
ZipEntryOptions.csGets or sets the compression method of the entry, or null for ZipCompressionOptions.CompressionMethod.
public ZipCompressionMethod? CompressionMethod { get; set; }Property value
Encryption
ZipEntryOptions.csGets or sets the encryption of the entry, or null for ZipCompressionOptions.Encryption. It applies only when the entry has a password; ZipEncryption.None writes the entry without encryption.
public ZipEncryption? Encryption { get; set; }Property value
LastWriteTime
ZipEntryOptions.csGets or sets the last time the entry was modified, or null for the current time. It is written as an MS-DOS time, in the local time zone and with a 2-second precision (as ZipArchive does), and as a Unix time in UTC, with a 1-second precision, in the extended timestamp extra field (0x5455).
public DateTimeOffset? LastWriteTime { get; set; }Property value
Password
ZipEntryOptions.csGets or sets the password of the entry, or null for ZipCompressionOptions.Password. An empty string writes the entry without encryption, even when the archive has a password.
public string? Password { get; set; }Property value
UnixFileMode
ZipEntryOptions.csGets or sets the Unix permissions of the entry, or null. When it is set, the entry is marked as created on Unix, and the high 16 bits of its external attributes are its mode: the file type and the permissions.
public UnixFileMode? UnixFileMode { get; set; }