겪어보신 분들이 있을지 모르겠습니다.
제가 테스트한 것은
UNIX Type: L8 Version: SUNOS
poseidon FTP server
입니다.
파일 전송이나 로긴에서는 문제가 없는데 파일 목록을 받아오는 FtpFindFirstFile이나 CFtpFileFind에서는 정상적으로 목록을 받아오지 못합니다.
그 poseidon FTP 서버에 대해 LIST를 해보니까....
-rw------- 1 root root 478392 8월 27일 10:19 core
-rw-r--r-- 1 root other 2542 2001년 12월 12일 cshrc.org
위와 같은 식으로 특이하게 나옵니다.
첫 번째 항목은 "8월 27일 10:19"라고 나오고...
두 번째 항목은 "2001년 12월 12일"이라고 나온 것을 볼 수 있습니다.
이런 경우, WinINET에서 제공되는 편리한 FTP 라이브러리를 버리기에는 너무 아깝죠.
다른 공개 라이브러리 찾기도 그렇고, 새로 만들기에는 더더욱 귀찮을 테니까요.
아마도 MS에서도 이 부분을 예상하지 않았나 싶네요. ^^ CFtpConnection::FtpCommand 함수를 이용하시거나 FtpCommand 함수를 이용해서 직접 목록에 대한 파싱을 하는 것도 좋습니다. 목록 부분만 FtpCommand로 직접 처리를 하고 나머지에 대해서는 마찬가지로 CFtpConnection에서 제공되는 편리한 함수들을 사용하면 되니까요.
대략 다음과 같은 식으로 사용하면 되겠지요. ^^
CString cmd = "CWD /userroot";
m_ftpConnection->Command( cmd, CFtpConnection::CmdResponseType::CmdRespNone );
CInternetFile *iFile = m_ftpConnection->Command( "LIST", CFtpConnection::CmdResponseType::CmdRespRead );
CString readText;
while ( iFile->ReadString( readText ) )
{
// readText 문자열 파싱
}
iFile->Close();
No | Writer | Date | Cnt. | Title | File(s) |
11894 | 정성태 | 5/10/2019 | 24494 | VS.NET IDE: 135. Visual Studio - ML.NET Model Builder 소개 [5] | |
11893 | 정성태 | 5/10/2019 | 20569 | 오류 유형: 535. C# 6.0 이상의 문법을 컴파일 시 오류가 발생한다면? | |
11892 | 정성태 | 5/10/2019 | 20487 | 웹: 38. HTTP Cookie의 expires 시간 형식(RFC7231) | |
11891 | 정성태 | 5/9/2019 | 23620 | .NET Framework: 831. (번역글) .NET Internals Cookbook Part 12 - Memory structure, attributes, handles | |
11890 | 정성태 | 5/8/2019 | 19266 | 개발 환경 구성: 439. "Visual Studio Enterprise is required to execute the test." 메시지와 관련된 코드 기록 | |
11889 | 정성태 | 5/8/2019 | 19298 | 개발 환경 구성: 438. mstest, QTAgent의 로그 파일 설정 방법 | |
11888 | 정성태 | 5/8/2019 | 37201 | .NET Framework: 830. C# - 비동기 호출을 취소하는 CancellationToken의 간단한 예제 코드 [1] | 1 |
11887 | 정성태 | 5/8/2019 | 23058 | .NET Framework: 829. C# - yield 문을 사용할 수 있는 메서드의 조건 | |
11886 | 정성태 | 5/7/2019 | 20108 | 오류 유형: 534. mstest.exe 실행 시 "Visual Studio Enterprise is required to execute the test." 오류 [2] | |
11885 | 정성태 | 5/7/2019 | 17590 | 오류 유형: 533. mstest.exe 실행 시 "File extension specified '.loadtest' is not a valid test extension." 오류 발생 | |
11884 | 정성태 | 5/5/2019 | 22502 | .NET Framework: 828. C# DLL에서 Win32 C/C++처럼 dllexport 함수를 제공하는 방법 - 두 번째 이야기 | |
11883 | 정성태 | 5/3/2019 | 27509 | .NET Framework: 827. C# - 인터넷 시간 서버로부터 받은 시간을 윈도우에 적용하는 방법 | 1 |
11882 | 정성태 | 5/2/2019 | 23953 | .NET Framework: 826. (번역글) .NET Internals Cookbook Part 11 - Various C# riddles | 1 |
11881 | 정성태 | 4/28/2019 | 24073 | 오류 유형: 532. .NET Core 프로젝트로 마이그레이션 시 "CS0579 Duplicate 'System.Reflection.AssemblyCompanyAttribute' attribute" 오류 발생 | |
11880 | 정성태 | 4/25/2019 | 19805 | 오류 유형: 531. 이벤트 로그 오류 - Task Scheduling Error: m->NextScheduledSPRetry 1547, m->NextScheduledEvent 1547 | |
11879 | 정성태 | 4/24/2019 | 28741 | .NET Framework: 825. (번역글) .NET Internals Cookbook Part 10 - Threads, Tasks, asynchronous code and others | 2 |
11878 | 정성태 | 4/22/2019 | 23993 | .NET Framework: 824. (번역글) .NET Internals Cookbook Part 9 - Finalizers, queues, card tables and other GC stuff | 1 |
11877 | 정성태 | 4/22/2019 | 24190 | .NET Framework: 823. (번역글) .NET Internals Cookbook Part 8 - C# gotchas | 1 |
11876 | 정성태 | 4/21/2019 | 22489 | .NET Framework: 822. (번역글) .NET Internals Cookbook Part 7 - Word tearing, locking and others | 1 |
11875 | 정성태 | 4/21/2019 | 24305 | 오류 유형: 530. Visual Studo에서 .NET Core 프로젝트를 열 때 "One or more errors occurred." 오류 발생 | |
11874 | 정성태 | 4/20/2019 | 24327 | .NET Framework: 821. (번역글) .NET Internals Cookbook Part 6 - Object internals | 1 |
11873 | 정성태 | 4/19/2019 | 22991 | .NET Framework: 820. (번역글) .NET Internals Cookbook Part 5 - Methods, parameters, modifiers | 1 |
11872 | 정성태 | 4/17/2019 | 23865 | .NET Framework: 819. (번역글) .NET Internals Cookbook Part 4 - Type members | 1 |
11871 | 정성태 | 4/16/2019 | 21784 | .NET Framework: 818. (번역글) .NET Internals Cookbook Part 3 - Initialization tricks [3] | 1 |
11870 | 정성태 | 4/16/2019 | 20643 | .NET Framework: 817. Process.Start로 실행한 콘솔 프로그램의 출력 결과를 얻는 방법 | 1 |
11869 | 정성태 | 4/15/2019 | 26968 | .NET Framework: 816. (번역글) .NET Internals Cookbook Part 2 - GC-related things [2] | 2 |