Xceed .NET Libraries Documentation
DefaultAutomaticWriteFileShare Property


Xceed.SSH.Client Assembly > Xceed.SSH.Client Namespace > SFtpFile Class : DefaultAutomaticWriteFileShare Property
Gets or sets a value indicating the default FileShare value to be used when opening write streams for copy/move operations.
Syntax
'Declaration
 
Public Shared ReadOnly Property DefaultAutomaticWriteFileShare As FileShare
'Usage
 
Dim value As FileShare
 
value = SFtpFile.DefaultAutomaticWriteFileShare
public static FileShare DefaultAutomaticWriteFileShare {get;}

Property Value

A System.IO.FileShare value representing the default value to be used when opening write streams for copy/move operations. The default value is the DefaultWriteFileShare constant.
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.None.

Example
Handling File Sharing Issues
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

Reference

SFtpFile Class
SFtpFile Members

Information

Handling File Sharing Issues