Opens the file for writing providing an encryption password and specifying if existing data should be replaced. Events will be raised during the process.
'Declaration
Public Overloads Function OpenWrite( _
ByVal As Xceed.FileSystem.FileSystemEvents, _
ByVal As Object, _
ByVal As Boolean, _
ByVal As CompressionMethod, _
ByVal As CompressionLevel, _
ByVal As String _
) As Stream
'Usage
Dim instance As ZippedFile
Dim events As Xceed.FileSystem.FileSystemEvents
Dim userData As Object
Dim overwrite As Boolean
Dim compressionMethod As CompressionMethod
Dim compressionLevel As CompressionLevel
Dim encryptionPassword As String
Dim value As Stream
value = instance.OpenWrite(events, userData, overwrite, compressionMethod, compressionLevel, encryptionPassword)
public Stream OpenWrite(
Xceed.FileSystem.FileSystemEvents ,
object ,
bool ,
CompressionMethod ,
CompressionLevel ,
string
)
Parameters
- events
- A Xceed.FileSystem.FileSystemEvents object that will be used to raise events. Cannot be a null reference (Nothing in Visual Basic).
- userData
- Opaque data that will be passed back to the event handler when an event is raised.
- overwrite
- true if existing data for the item should be replaced; false if existing data should be preserved, appending new data at the end.
- compressionMethod
- The CompressionMethod that will be used to compress the file.
- compressionLevel
- The CompressionLevel that will be used when compressing the file.
- encryptionPassword
- The password that will be used to encrypt the file.
Return Value
A
System.IO.Stream object that can be used to write data to the file.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2