Notice
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- roundcube
- dovecot
- Android
- WebView
- 안드로이드 gcm
- FCM
- javascript
- 폼메일
- C# IO
- php 취약점
- chart.js
- soundpool
- xe
- 우분투
- php 시큐어코딩
- 자바스크립트
- PHP
- Mail Server
- 안드로이드 푸시
- curl
- 안드로이드
- html5
- 설치
- 안드로이드 푸쉬
- C#
- mysql
- 자동 생성
- not working
- UML
- android 효과음
Archives
- Today
- Total
그러냐
c# ftp 파일&디렉토리 리스트 얻기 본문
반응형
Uri ftpUri = new Uri("ftp://xxx.xxx.xxx.xxx/");
FtpWebRequest reqFtp = (FtpWebRequest)WebRequest.Create(ftpUri);
reqFtp.Credentials = new NetworkCredential("ID", "PASS");
reqFtp.Timeout = 10000;
reqFtp.Method = WebRequestMethods.Ftp.ListDirectory;
FtpWebResponse resFtp = (FtpWebResponse)reqFtp.GetResponse();
StreamReader reader;
reader = new StreamReader(resFtp.GetResponseStream());
string strData;
strData = reader.ReadToEnd();
string[] filesInDirectory = strData.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
resFtp.Close();
반응형
'c#' 카테고리의 다른 글
C# 기본프린터 설정을 잠시 바꾸고 다시 돌리는 방법 (0) | 2017.10.11 |
---|---|
byte[] 배열 합치기/복사 (0) | 2017.07.18 |
C# HttpWebRequest command to get directory listing (0) | 2016.01.28 |
DirectShow Stream Media 다루기 (0) | 2016.01.28 |
C#에서 DirectShow를 이용한 핀 연결하기 (0) | 2016.01.28 |