Метод | Описание | |
---|---|---|
CreateEntryFromFile ( this destination, string sourceFileName, string entryName ) : |
Adds a file from the file system to the archive under the specified entry name. The new entry in the archive will contain the contents of the file. The last write time of the archive entry is set to the last write time of the file on the file system. If an entry with the specified name already exists in the archive, a second entry will be created that has an identical name. If the specified source file has an invalid last modified time, the first datetime representable in the Zip timestamp format (midnight on January 1, 1980) will be used. If an entry with the specified name already exists in the archive, a second entry will be created that has an identical name. Since no
|
|
CreateEntryFromFile ( this destination, string sourceFileName, string entryName, CompressionLevel compressionLevel ) : |
Adds a file from the file system to the archive under the specified entry name. The new entry in the archive will contain the contents of the file. The last write time of the archive entry is set to the last write time of the file on the file system. If an entry with the specified name already exists in the archive, a second entry will be created that has an identical name. If the specified source file has an invalid last modified time, the first datetime representable in the Zip timestamp format (midnight on January 1, 1980) will be used. If an entry with the specified name already exists in the archive, a second entry will be created that has an identical name.
|
|
ExtractToDirectory ( this source, string destinationDirectoryName ) : void |
Extracts all of the files in the archive to a directory on the file system. The specified directory may already exist. This method will create all subdirectories and the specified directory if necessary. If there is an error while extracting the archive, the archive will remain partially extracted. Each entry will be extracted such that the extracted file has the same relative path to destinationDirectoryName as the entry has to the root of the archive. If a file to be archived has an invalid last modified time, the first datetime representable in the Zip timestamp format (midnight on January 1, 1980) will be used.
|
|
ExtractToFile ( this source, string destinationFileName ) : void |
Creates a file on the file system with the entry?s contents and the specified name. The last write time of the file is set to the entry?s last write time. This method does not allow overwriting of an existing file with the same name. Attempting to extract explicit directories (entries with names that end in directory separator characters) will not result in the creation of a directory.
|
|
ExtractToFile ( this source, string destinationFileName, bool overwrite ) : void |
Creates a file on the file system with the entry?s contents and the specified name. The last write time of the file is set to the entry?s last write time. This method does allows overwriting of an existing file with the same name.
|
Метод | Описание | |
---|---|---|
DoCreateEntryFromFile ( |
public static CreateEntryFromFile ( this destination, string sourceFileName, string entryName ) : |
||
destination | this | |
sourceFileName | string | The path to the file on the file system to be copied from. The path is permitted to specify /// relative or absolute path information. Relative path information is interpreted as relative to the current working directory. |
entryName | string | The name of the entry to be created. |
Результат |
public static CreateEntryFromFile ( this destination, string sourceFileName, string entryName, CompressionLevel compressionLevel ) : |
||
destination | this | |
sourceFileName | string | The path to the file on the file system to be copied from. The path is permitted to specify relative /// or absolute path information. Relative path information is interpreted as relative to the current working directory. |
entryName | string | The name of the entry to be created. |
compressionLevel | CompressionLevel | The level of the compression (speed/memory vs. compressed size trade-off). |
Результат |
public static ExtractToDirectory ( this source, string destinationDirectoryName ) : void | ||
source | this | |
destinationDirectoryName | string | The path to the directory on the file system. /// The directory specified must not exist. The path is permitted to specify relative or absolute path information. /// Relative path information is interpreted as relative to the current working directory. |
Результат | void |
public static ExtractToFile ( this source, string destinationFileName ) : void | ||
source | this | |
destinationFileName | string | The name of the file that will hold the contents of the entry. /// The path is permitted to specify relative or absolute path information. /// Relative path information is interpreted as relative to the current working directory. |
Результат | void |
public static ExtractToFile ( this source, string destinationFileName, bool overwrite ) : void | ||
source | this | |
destinationFileName | string | The name of the file that will hold the contents of the entry. /// The path is permitted to specify relative or absolute path information. /// Relative path information is interpreted as relative to the current working directory. |
overwrite | bool | True to indicate overwrite. |
Результат | void |