diff options
Diffstat (limited to 'ext/ftp/ftp.c')
-rw-r--r-- | ext/ftp/ftp.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 45b01e799d..a750265fcc 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -315,6 +315,20 @@ ftp_pwd(ftpbuf_t *ftp) int +ftp_exec(ftpbuf_t *ftp, const char *cmd) +{ + if (ftp == NULL) + return 0; + if (!ftp_putcmd(ftp, "SITE EXEC", cmd)) + return 0; + if (!ftp_getresp(ftp) || ftp->resp != 200) + return 0; + + return 1; +} + + +int ftp_chdir(ftpbuf_t *ftp, const char *dir) { if (ftp == NULL) |