diff options
| author | Stefan Esser <sesser@php.net> | 2002-07-26 13:03:08 +0000 |
|---|---|---|
| committer | Stefan Esser <sesser@php.net> | 2002-07-26 13:03:08 +0000 |
| commit | c9676ccad7bc284d5be51d1d1040e0638ecf7e28 (patch) | |
| tree | 997e9449121f1b4890e4dddc8376c63dccca2575 /ext/ftp/ftp.h | |
| parent | 9aca197515a6c1f569f921aa80b77d2510c3abfc (diff) | |
| download | php-git-c9676ccad7bc284d5be51d1d1040e0638ecf7e28.tar.gz | |
@- FTP extension does support (auto)resuming now.
Added (Auto)Resuming functionality to ftp_(f)get/(f)put via optional 5th parameter.
Diffstat (limited to 'ext/ftp/ftp.h')
| -rw-r--r-- | ext/ftp/ftp.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/ftp/ftp.h b/ext/ftp/ftp.h index f980a8c757..0dfb304810 100644 --- a/ext/ftp/ftp.h +++ b/ext/ftp/ftp.h @@ -13,6 +13,7 @@ | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andrew Skalski <askalski@chek.com> | + | Stefan Esser <sesser@php.net> (resume functions) | +----------------------------------------------------------------------+ */ @@ -29,6 +30,7 @@ #endif #define FTP_DEFAULT_TIMEOUT 90 +#define FTP_DEFAULT_AUTOSEEK 1 /* XXX this should be configurable at runtime XXX */ #define FTP_BUFSIZE 4096 @@ -53,6 +55,7 @@ typedef struct ftpbuf int pasv; /* 0=off; 1=pasv; 2=ready */ php_sockaddr_storage pasvaddr; /* passive mode address */ long timeout_sec; /* User configureable timeout (seconds) */ + int autoseek; /* User configureable autoseek flag */ } ftpbuf_t; typedef struct databuf @@ -131,12 +134,12 @@ int ftp_pasv(ftpbuf_t *ftp, int pasv); * returns true on success, false on error */ int ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, - ftptype_t type); + ftptype_t type, int resumepos); /* stores the data from a file, socket, or process as a file on the remote server * returns true on success, false on error */ -int ftp_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type); +int ftp_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, int startpos); /* returns the size of the given file, or -1 on error */ int ftp_size(ftpbuf_t *ftp, const char *path); |
