Ionic Zip Library v1.9.1.6
UpdateFiles Method (fileNames, directoryPathInArchive)
Adds or updates a set of files to the ZipFile, using the specified
directory path in the archive.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public void UpdateFiles( IEnumerable<string> fileNames, string directoryPathInArchive )
Public Sub UpdateFiles ( _ fileNames As IEnumerable(Of String), _ directoryPathInArchive As String _ )
public: void UpdateFiles( IEnumerable<String^>^ fileNames, String^ directoryPathInArchive )
Parameters
- fileNames (IEnumerable<(Of <(<'String>)>)>)
- The names of the files to add or update. Each string should refer to a file in the filesystem. The name of the file may be a relative path or a fully-qualified path.
- directoryPathInArchive (String)
- Specifies a directory path to use to override any path in the file name. This path may, or may not, correspond to a real directory in the current filesystem. If the files within the zip are later extracted, this is the path used for the extracted file. Passing null (Nothing in VB) will use the path on each of the fileNames, if any. Passing the empty string ("") will insert the item at the root path within the archive.
Remarks
Any files that already exist in the archive are updated. Any files that don't yet exist in the archive are added.
For ZipFile properties including Encryption, Password, SetCompression, ProvisionalAlternateEncoding, ExtractExistingFile, ZipErrorAction, and CompressionLevel, their respective values at the time of this call will be applied to each ZipEntry added.
See Also