0
C#에서 FluentFTP를 사용하여 FTP 전송을 구현하려고합니다. 디렉토리 목록을 얻는 것은 매우 쉽지만 어떻게 파일을 다운로드 할 수 있습니까?FluentFTP를 사용하여 파일 다운로드
C#에서 FluentFTP를 사용하여 FTP 전송을 구현하려고합니다. 디렉토리 목록을 얻는 것은 매우 쉽지만 어떻게 파일을 다운로드 할 수 있습니까?FluentFTP를 사용하여 파일 다운로드
FluentFTP의 최신 버전에는 DownloadFile()
및 UploadFile()
개의 메소드가 내장되어 있습니다. https://github.com/robinrodricks/FluentFTP#example-usage에서
사용 예제 :
// connect to the FTP server
FtpClient client = new FtpClient();
client.Host = "123.123.123.123";
client.Credentials = new NetworkCredential("david", "pass123");
client.Connect();
// upload a file
client.UploadFile(@"C:\MyVideo.mp4", "/htdocs/big.txt");
// rename the uploaded file
client.Rename("/htdocs/big.txt", "/htdocs/big2.txt");
// download the file again
client.DownloadFile(@"C:\MyVideo_2.mp4", "/htdocs/big2.txt");