VintaSoft Imaging .NET SDK 14.0: Documentation for .NET developer
Vintasoft.Data Namespace / FileManager Class / OpenFile(String,FileAccess) Method
Syntax Exceptions Remarks Requirements SeeAlso
    OpenFile(String,FileAccess) Method (FileManager)
    Opens an existing file with the specified access mode.
    Syntax
    'Declaration
    
    Public Shared Function OpenFile( _
    ByVal filePath
    An absolute path to a file.
    As System.String, _
    ByVal fileAccess
    A constant that defines how the file can be accessed.
    As System.IO.FileAccess _
    ) As System.IO.FileStream
     

    Parameters

    filePath
    An absolute path to a file.
    fileAccess
    A constant that defines how the file can be accessed.

    Return Value

    File stream.
    Exceptions
    ExceptionDescription
    Thrown if file must be opened but file is not found.
    Thrown if file must be created but file exists already.
    Thrown if file is locked.
    Remarks

    The method will create new file if fileAccess is set to System.IO.FileAccess.Write; otherwise, the method will open a file.

    Requirements

    Target Platforms: .NET9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    See Also