Sets the work directory on the server
Namespace: System.Net.FtpClient
Assembly: System.Net.FtpClient (in System.Net.FtpClient.dll) Version: 1.0.5064.17461
Syntax
C# |
public void SetWorkingDirectory(
string path
)
|
Visual Basic |
Public Sub SetWorkingDirectory (
path As String
)
|
Visual C++ |
public:
virtual void SetWorkingDirectory(
String^ path
) sealed
|
Implements
IFtpClient..::..SetWorkingDirectory(String)
Examples
C# |
Copy
|
using System;
using System.Net;
using System.Net.FtpClient;
using System.IO;
namespace Examples {
public static class SetWorkingDirectoryExample {
public static void SetWorkingDirectory() {
using (FtpClient conn = new FtpClient()) {
conn.Host = "localhost";
conn.Credentials = new NetworkCredential("ftptest", "ftptest");
conn.SetWorkingDirectory("/full/or/relative/path");
}
}
}
}
|
See Also