QuickOPC User's Guide and Reference
FromBits Method



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA.FileTransfer Namespace > UAOpenFileModesUtilities Class : FromBits Method
Whether the file should be opened for reading.
Whether the file should be opened for writing.
Whether to erase existing content of the file.
Whether to open at the end of the file (intended for writing).
Creates OPC UA open file modes enumeration value from individual bits.
Syntax
'Declaration
 
Public Shared Function FromBits( _
   ByVal read As Boolean, _
   ByVal write As Boolean, _
   ByVal eraseExisting As Boolean, _
   ByVal append As Boolean _
) As UAOpenFileModes
'Usage
 
Dim read As Boolean
Dim write As Boolean
Dim eraseExisting As Boolean
Dim append As Boolean
Dim value As UAOpenFileModes
 
value = UAOpenFileModesUtilities.FromBits(read, write, eraseExisting, append)
public:
static UAOpenFileModes FromBits( 
   bool read,
   bool write,
   bool eraseExisting,
   bool append
) 

Parameters

read
Whether the file should be opened for reading.
write
Whether the file should be opened for writing.
eraseExisting
Whether to erase existing content of the file.
append
Whether to open at the end of the file (intended for writing).

Return Value

Returns OPC UA open file modes enumeration value that represents the bits specified in the input arguments.
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also

Reference

UAOpenFileModesUtilities Class
UAOpenFileModesUtilities Members
OpenFile Method
OpcLabs.EasyOpc.UA.FileTransfer.IEasyUAFileTransferExtension.OpenFile(OpcLabs.EasyOpc.UA.FileTransfer.IEasyUAFileTransfer,OpcLabs.EasyOpc.UA.UAEndpointDescriptor,OpcLabs.EasyOpc.UA.UANodeDescriptor,System.String,OpcLabs.EasyOpc.UA.FileTransfer.UAOpenFileModes)
OpenStream(IEasyUAFileTransfer,UAEndpointDescriptor,UANamedNodeDescriptor,UAOpenFileModes) Method