Chat Support
Loupe - Log - Monitor - Resolve
Gibraltar.Data Namespace / FileHelper Class / OpenFileStream Method
The full-path file name to create or open.
An action to take on files that exist and do not exist
Desired access to the object, which can be read, write, or both
The sharing mode of an object, which can be read, write, both, or none

In This Topic
    OpenFileStream Method
    In This Topic
    Attempt to open a FileStream while avoiding exceptions.
    Syntax
    'Declaration
     
    
    Public Shared Function OpenFileStream( _
       ByVal fileName As String, _
       ByVal creationMode As FileMode, _
       ByVal fileAccess As FileAccess, _
       ByVal fileShare As FileShare _
    ) As FileStream

    Parameters

    fileName
    The full-path file name to create or open.
    creationMode
    An action to take on files that exist and do not exist
    fileAccess
    Desired access to the object, which can be read, write, or both
    fileShare
    The sharing mode of an object, which can be read, write, both, or none

    Return Value

    An open FileStream, or null upon failure.
    Requirements

    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

    See Also