FtpClientConnection.ReceiveFiles(String[], String, Boolean, Boolean) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
파일 전송 프로토콜(FTP) 서버로부터 파일을 수신합니다.
public:
void ReceiveFiles(cli::array <System::String ^> ^ remoteFileNames, System::String ^ localPath, bool overwrite, bool isTransferAscii);
public void ReceiveFiles(string[] remoteFileNames, string localPath, bool overwrite, bool isTransferAscii);
member this.ReceiveFiles : string[] * string * bool * bool -> unit
Public Sub ReceiveFiles (remoteFileNames As String(), localPath As String, overwrite As Boolean, isTransferAscii As Boolean)
매개 변수
- remoteFileNames
- String[]
FTP 서버에 저장된 파일을 받아야 합니다.
- localPath
- String
원격 파일을 받고자 하는 로컬 경로입니다.
- overwrite
- Boolean
파일이 이미 로컬 컴퓨터에 존재할 경우 파일을 덮어쓸지 여부를 지정합니다. true의 경우, 작업이 기존 파일을 덮어쓸 것임을 나타냅니다.
- isTransferAscii
- Boolean
파일을 ASCII 모드로 수신해야 하는지 명시합니다. true가 있으면 파일이 ASCII 모드로 수신되어야 함을 나타냅니다.
예제
다음 코드 예제에서는 메서드를 사용 하는 방법을 보여 있습니다 ReceiveFiles .
String [] remoteFileNames = {"myTestFile", "myFTPFile"};
String localPath = "Program Files";
myftpClientConn.ReceiveFiles(remoteFileNames, localPath, true, true);
Dim remoteFileNames() As String = {"myTestFile", "myFTPFile"}
Dim localPath As String = "Program Files"
myftpClientConn.ReceiveFiles(remoteFileNames, localPath, True, True)
설명
와일드 카드 캐릭터도 허용됩니다. 예를 들어, /MyFolder/MyFiles*.* 에서 수신 remoteFileNames 하면 MyFiles 문자로 시작하는 MyFolder 디렉터리 내 모든 파일을 가져옵니다.