NET SFTP Library
CurrentDirectory Property
Example 






KellermanSoftware.NetSFtpLibrary Namespace > SFTP Class : CurrentDirectory Property
Specifies the current FTP directory.
Syntax
'Declaration
 
Public Property CurrentDirectory As System.String
'Usage
 
Dim instance As SFTP
Dim value As System.String
 
instance.CurrentDirectory = value
 
value = instance.CurrentDirectory
public System.string CurrentDirectory {get; set;}
public read-write property CurrentDirectory: System.String; 
public function get,set CurrentDirectory : System.String
public: __property System.string* get_CurrentDirectory();
public: __property void set_CurrentDirectory( 
   System.string* value
);
public:
property System.String^ CurrentDirectory {
   System.String^ get();
   void set (    System.String^ value);
}
Example
SFTP sftp = new SFTP(); //Trial Mode            
//SFTP sftp = new SFTP("place user name here", "place license key here");
 
// set the name of the SSH server( its URL )
sftp.HostAddress = "some.sftp.server.com"; // replace with your SFTP server
sftp.UserName  = "anonymous"; // replace with your user name
sftp.Password = "user@mail.com"; // replace with your password
 
// gets or sets the current directory for the ftp server.
// / represents the root of the ftp file system
sftp.CurrentDirectory = "/";
System.Console.WriteLine("Current directory is {0}", sftp.CurrentDirectory);
Dim sftp As SFTP = New SFTP() 'Trial Mode
'Dim sftp As SFTP = New SFTP("place user name here", "place license key here");
 
' set the name of the SSH server( its URL )
sftp.HostAddress = "some.sftp.server.com" ' replace with your SFTP server
sftp.UserName  = "anonymous" ' replace with your user name
sftp.Password = "user@mail.com" ' replace with your password
 
' gets or sets the current directory for the ftp server.
' / represents the root of the ftp file system
sftp.CurrentDirectory = "/"
System.Console.WriteLine("Current directory is {0}", sftp.CurrentDirectory)
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

SFTP Class
SFTP Members