[완료]raw FTP command 관련 질문
안녕하세요.
황사가 심하네요.
건강 조심하세요.
질문이 하나 있어서 이렇게 글을 남깁니다.
제가 프로그램에서 파일을 가져 올 일이 있어서
ftp source를 구했는데요.
int ftp_chdir(ftpbuf_t *ftp, const char *dir)
{
if (ftp == NULL)
return 0;
free(ftp->pwd);
ftp->pwd = NULL;
if (!ftp_putcmd(ftp, "CWD", dir))
return 0;
if (!ftp_getresp(ftp) || ftp->resp != 250)
return 0;
return 1;
}
CD는 CWD로 되어 있더라구요.
raw FTP Command에 대해 찾아보니 아래와 같은 정보를 얻었습니다.
문제는 파일을 제가 원하는 위치에 받고 싶은데
raw FTP Command에서는 lcd는 안되는 것인가요?
우문현답 부탁드리겠습니다.
ABOR - abort a file transfer
CWD - change working directory
DELE - delete a remote file
LIST - list remote files
MDTM - return the modification time of a file
MKD - make a remote directory
NLST - name list of remote directory
PASS - send password
PASV - enter passive mode
PORT - open a data port
PWD - print working directory
QUIT - terminate the connection
RETR - retrieve a remote file
RMD - remove a remote directory
RNFR - rename from
RNTO - rename to
SITE - site-specific commands
SIZE - return the size of a file
STOR - store a file on the remote host
TYPE - set transfer type
USER - send username
자답입니다.
lcd의 경우는
chdir( " " );로 변경해주면 되네요.
감사합니다.
댓글 달기