summaryrefslogtreecommitdiff
path: root/ext/ftp/ftp.h
diff options
context:
space:
mode:
authorSara Golemon <pollita@php.net>2003-09-18 17:36:08 +0000
committerSara Golemon <pollita@php.net>2003-09-18 17:36:08 +0000
commitc553af47e06c434ea943d51a386c5f156ce34875 (patch)
treef0efa9faaf4208575dcc52b0606d5e58a24bf2db /ext/ftp/ftp.h
parent3efe102a4801a36f5515e8166c967ac595b4876e (diff)
downloadphp-git-c553af47e06c434ea943d51a386c5f156ce34875.tar.gz
Add ftp_alloc() for servers which require client to predeclare filesize to be sent.
Diffstat (limited to 'ext/ftp/ftp.h')
-rw-r--r--ext/ftp/ftp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/ftp/ftp.h b/ext/ftp/ftp.h
index 0628a0dfcf..35eb376ac4 100644
--- a/ext/ftp/ftp.h
+++ b/ext/ftp/ftp.h
@@ -141,6 +141,13 @@ int ftp_rmdir(ftpbuf_t *ftp, const char *dir);
/* Set permissions on a file */
int ftp_chmod(ftpbuf_t *ftp, const int mode, const char *filename, const int filename_len);
+/* Allocate space on remote server with ALLO command
+ * Many servers will respond with 202 Allocation not necessary,
+ * however some servers will not accept STOR or APPE until ALLO is confirmed.
+ * If response is passed, it is estrdup()ed from ftp->inbuf and must be freed
+ * or assigned to a zval returned to the user */
+int ftp_alloc(ftpbuf_t *ftp, const int size, char **response);
+
/* returns a NULL-terminated array of filenames in the given path
* or NULL on error. the return array must be freed (but don't
* free the array elements)