Xceed .NET Libraries Documentation
Xceed.SSH.Client Assembly / Xceed.SSH.Client Namespace / SFtpFile Class / SetDefaultAutomaticReadFileShare Method
A System.IO.FileShare value representing the default value to be used when opening read streams for copy/move operations. Can be a null reference (Nothing in Visual Basic) to revert to the default value.


In This Topic
    SetDefaultAutomaticReadFileShare Method
    In This Topic
    Sets a value indicating the default FileShare value to be used when opening read streams for copy/move operations.
    Syntax
    'Declaration
     
    Public Shared Sub SetDefaultAutomaticReadFileShare( _
       ByVal share As Nullable(Of FileShare) _
    ) 
    'Usage
     
    Dim share As Nullable(Of FileShare)
     
    SFtpFile.SetDefaultAutomaticReadFileShare(share)
    public static void SetDefaultAutomaticReadFileShare( 
       Nullable<FileShare> share
    )

    Parameters

    share
    A System.IO.FileShare value representing the default value to be used when opening read streams for copy/move operations. Can be a null reference (Nothing in Visual Basic) to revert to the default value.
    Remarks

    Because the property is global, changing the value will affect every SFtpFile operation across your entire application, not just the current SFtp session.

    In most cases, it is not necessary to modify the default value of this property. But if the SFtp server supports it, it is good practice to set the value to FileShare.Read.

    Example
    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