Skip to content

Reference

IOpcFileInfo Members

Represents a single file in OPC UA and provides properties and instance methods for accessing files.

Reference

IOpcFileInfo Members ​

Type
IOpcFileInfo
Namespace
Opc.UaFx
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0

Properties ​

Exists ​

Gets a value indicating whether a file exists.

csharp
bool Exists { get; }
vbnet
ReadOnly Property Exists As Boolean

Property value

Boolean

The value true if the file exists; false if the file does not exist.

IsReadOnly ​

Gets or sets a value that determines if the current file is read only.

csharp
bool IsReadOnly { get; }
vbnet
ReadOnly Property IsReadOnly As Boolean

Property value

Boolean

The value true if the current file is read only; otherwise the value false.

Length ​

Gets the size, in bytes, of the current file.

csharp
long Length { get; }
vbnet
ReadOnly Property Length As Long

Property value

Int64

The size of the current file in bytes.

Methods ​

GetMimeType ​

Determines the internet media type (mime- or content-type) of the file.

csharp
string GetMimeType()
vbnet
Function GetMimeType() As String

Returns

String

The type name according to the specification of multipurpose internet mail extensions (MIME) of the file represented.

Open ​

Opens a file in the specified mode.

csharp
Stream Open(OpcFileMode mode)
vbnet
Function Open(mode As OpcFileMode) As Stream

Parameters

NameTypeDescription
modeOpcFileModeA OpcFileMode value specifying the mode in which to open the file.

Returns

Stream

A file opened in the specified mode.

Exceptions

ExceptionCondition
ArgumentExceptionThe file mode specified is invalid.

Refresh ​

Refreshes the state of the object.

csharp
void Refresh()
vbnet
Sub Refresh()

Exceptions

ExceptionCondition
IOExceptionA device such as a disk drive is not ready.