Xceed .NET Libraries Documentation
Xceed.Zip Assembly / Xceed.Zip Namespace / ZippedFile Class / DoOpenWrite Method / DoOpenWrite(FileSystemEventsSession,Boolean,FileShare,AbstractFile,Boolean,Stream,CompressionMethod,CompressionLevel,String,EncryptionMethod,Int32) Method
A reference to a object which is responsible for raising all events that occur during the process.The password used to encrypt the file.EncryptionMethodEncryptionMethod.WinZipAes


In This Topic
    DoOpenWrite(FileSystemEventsSession,Boolean,FileShare,AbstractFile,Boolean,Stream,CompressionMethod,CompressionLevel,String,EncryptionMethod,Int32) Method
    In This Topic
    Opens the file for writing with the specified System.IO.FileShare constant, and the specified encryption method, password and strength.
    Syntax
    'Declaration
     
    
    Protected Overloads Overridable Function DoOpenWrite( _
       ByVal session As FileSystemEventsSession, _
       ByVal overwrite As Boolean, _
       ByVal share As FileShare, _
       ByVal sourceFileHint As AbstractFile, _
       ByVal openPhysicalStreamOnly As Boolean, _
       ByVal outputStream As Stream, _
       ByVal compressionMethod As CompressionMethod, _
       ByVal compressionLevel As CompressionLevel, _
       ByVal encryptionPassword As String, _
       ByVal encryptionMethod As EncryptionMethod, _
       ByVal encryptionStrength As Integer _
    ) As Stream
    'Usage
     
    
    Dim instance As ZippedFile
    Dim session As FileSystemEventsSession
    Dim overwrite As Boolean
    Dim share As FileShare
    Dim sourceFileHint As AbstractFile
    Dim openPhysicalStreamOnly As Boolean
    Dim outputStream As Stream
    Dim compressionMethod As CompressionMethod
    Dim compressionLevel As CompressionLevel
    Dim encryptionPassword As String
    Dim encryptionMethod As EncryptionMethod
    Dim encryptionStrength As Integer
    Dim value As Stream
     
    value = instance.DoOpenWrite(session, overwrite, share, sourceFileHint, openPhysicalStreamOnly, outputStream, compressionMethod, compressionLevel, encryptionPassword, encryptionMethod, encryptionStrength)

    Parameters

    session
    A reference to a object which is responsible for raising all events that occur during the process.The password used to encrypt the file.EncryptionMethodEncryptionMethod.WinZipAes
    overwrite
    share
    sourceFileHint
    openPhysicalStreamOnly
    outputStream
    compressionMethod
    compressionLevel
    encryptionPassword
    encryptionMethod
    encryptionStrength

    Return Value

    A System.IO.Stream object that can be used to write data to the file.
    Remarks

    The returned stream is guaranteed to be writable, but may or may not be seekable.

    If there is no existing data, the parameter overwrite is ignored.

    Supported Frameworks

    .NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.

    .NET Standard: netstandard2.0, netstandard2.1

    .NET Framework: net20, net35, net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.

    See Also