OpenWrite(FileSystemEvents,Object,Boolean,FileShare,CompressionMethod,CompressionLevel,String) Method
Opens the file for writing providing an encryption password and file sharing mode as well as specifying if existing data should be replaced. Events will be raised during the process.
'Declaration
Public Overloads Function OpenWrite( _
ByVal As FileSystemEvents, _
ByVal As Object, _
ByVal As Boolean, _
ByVal As FileShare, _
ByVal As CompressionMethod, _
ByVal As CompressionLevel, _
ByVal As String _
) As Stream
'Usage
Dim instance As ZippedFile
Dim events As FileSystemEvents
Dim userData As Object
Dim overwrite As Boolean
Dim share As FileShare
Dim compressionMethod As CompressionMethod
Dim compressionLevel As CompressionLevel
Dim encryptionPassword As String
Dim value As Stream
value = instance.OpenWrite(events, userData, overwrite, share, compressionMethod, compressionLevel, encryptionPassword)
Parameters
- events
- A Xceed.FileSystem.FileSystemEvents object that will be used to raise events. Cannot be .
- 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.
- share
- A System.IO.FileShare constant that determines how the file will be shared by different processes.
- 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.
.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.