Back to index

php5  5.3.10
Classes | Defines | Typedefs | Enumerations | Functions
ftp.h File Reference
#include "php_network.h"
#include <stdio.h>

Go to the source code of this file.

Classes

struct  databuf
struct  ftpbuf

Defines

#define FTP_DEFAULT_TIMEOUT   90
#define FTP_DEFAULT_AUTOSEEK   1
#define PHP_FTP_FAILED   0
#define PHP_FTP_FINISHED   1
#define PHP_FTP_MOREDATA   2
#define FTP_BUFSIZE   4096

Typedefs

typedef enum ftptype ftptype_t
typedef struct databuf databuf_t
typedef struct ftpbuf ftpbuf_t

Enumerations

enum  ftptype { FTPTYPE_ASCII = 1, FTPTYPE_IMAGE }

Functions

ftpbuf_tftp_open (const char *host, short port, long timeout_sec TSRMLS_DC)
int ftp_quit (ftpbuf_t *ftp)
void ftp_gc (ftpbuf_t *ftp)
ftpbuf_tftp_close (ftpbuf_t *ftp)
int ftp_login (ftpbuf_t *ftp, const char *user, const char *pass TSRMLS_DC)
int ftp_reinit (ftpbuf_t *ftp)
const char * ftp_syst (ftpbuf_t *ftp)
const char * ftp_pwd (ftpbuf_t *ftp)
int ftp_exec (ftpbuf_t *ftp, const char *cmd)
void ftp_raw (ftpbuf_t *ftp, const char *cmd, zval *return_value)
int ftp_chdir (ftpbuf_t *ftp, const char *dir)
int ftp_cdup (ftpbuf_t *ftp)
char * ftp_mkdir (ftpbuf_t *ftp, const char *dir)
int ftp_rmdir (ftpbuf_t *ftp, const char *dir)
int ftp_chmod (ftpbuf_t *ftp, const int mode, const char *filename, const int filename_len)
int ftp_alloc (ftpbuf_t *ftp, const int size, char **response)
char ** ftp_nlist (ftpbuf_t *ftp, const char *path TSRMLS_DC)
char ** ftp_list (ftpbuf_t *ftp, const char *path, int recursive TSRMLS_DC)
int ftp_pasv (ftpbuf_t *ftp, int pasv)
int ftp_get (ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type, int resumepos TSRMLS_DC)
int ftp_put (ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, int startpos TSRMLS_DC)
int ftp_size (ftpbuf_t *ftp, const char *path)
time_t ftp_mdtm (ftpbuf_t *ftp, const char *path)
int ftp_rename (ftpbuf_t *ftp, const char *src, const char *dest)
int ftp_delete (ftpbuf_t *ftp, const char *path)
int ftp_site (ftpbuf_t *ftp, const char *cmd)
int ftp_nb_get (ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type, int resumepos TSRMLS_DC)
int ftp_nb_put (ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, int startpos TSRMLS_DC)
int ftp_nb_continue_read (ftpbuf_t *ftp TSRMLS_DC)
int ftp_nb_continue_write (ftpbuf_t *ftp TSRMLS_DC)

Class Documentation

struct databuf

Definition at line 46 of file ftp.h.

Class Members
char buf
php_socket_t fd
int listener
ftptype_t type
struct ftpbuf

Definition at line 58 of file ftp.h.

Collaboration diagram for ftpbuf:
Class Members
int autoseek
int closestream
databuf_t * data
int direction
char * extra
int extralen
php_socket_t fd
char inbuf
int lastch
php_sockaddr_storage localaddr
int nb
char outbuf
int pasv
php_sockaddr_storage pasvaddr
char * pwd
int resp
php_stream * stream
char * syst
long timeout_sec
ftptype_t type

Define Documentation

#define FTP_BUFSIZE   4096

Definition at line 39 of file ftp.h.

#define FTP_DEFAULT_AUTOSEEK   1

Definition at line 33 of file ftp.h.

#define FTP_DEFAULT_TIMEOUT   90

Definition at line 32 of file ftp.h.

#define PHP_FTP_FAILED   0

Definition at line 34 of file ftp.h.

#define PHP_FTP_FINISHED   1

Definition at line 35 of file ftp.h.

#define PHP_FTP_MOREDATA   2

Definition at line 36 of file ftp.h.


Typedef Documentation

typedef struct databuf databuf_t
typedef struct ftpbuf ftpbuf_t
typedef enum ftptype ftptype_t

Enumeration Type Documentation

enum ftptype
Enumerator:
FTPTYPE_ASCII 
FTPTYPE_IMAGE 

Definition at line 41 of file ftp.h.


Function Documentation

int ftp_alloc ( ftpbuf_t ftp,
const int  size,
char **  response 
)
int ftp_cdup ( ftpbuf_t ftp)
int ftp_chdir ( ftpbuf_t ftp,
const char *  dir 
)
int ftp_chmod ( ftpbuf_t ftp,
const int  mode,
const char *  filename,
const int  filename_len 
)
int ftp_delete ( ftpbuf_t ftp,
const char *  path 
)
int ftp_exec ( ftpbuf_t ftp,
const char *  cmd 
)
void ftp_gc ( ftpbuf_t ftp)
int ftp_get ( ftpbuf_t ftp,
php_stream *  outstream,
const char *  path,
ftptype_t  type,
int resumepos  TSRMLS_DC 
)
char** ftp_list ( ftpbuf_t ftp,
const char *  path,
int recursive  TSRMLS_DC 
)
int ftp_login ( ftpbuf_t ftp,
const char *  user,
const char *pass  TSRMLS_DC 
)
time_t ftp_mdtm ( ftpbuf_t ftp,
const char *  path 
)
char* ftp_mkdir ( ftpbuf_t ftp,
const char *  dir 
)
int ftp_nb_continue_read ( ftpbuf_t *ftp  TSRMLS_DC)
int ftp_nb_continue_write ( ftpbuf_t *ftp  TSRMLS_DC)
int ftp_nb_get ( ftpbuf_t ftp,
php_stream *  outstream,
const char *  path,
ftptype_t  type,
int resumepos  TSRMLS_DC 
)
int ftp_nb_put ( ftpbuf_t ftp,
const char *  path,
php_stream *  instream,
ftptype_t  type,
int startpos  TSRMLS_DC 
)
char** ftp_nlist ( ftpbuf_t ftp,
const char *path  TSRMLS_DC 
)
ftpbuf_t* ftp_open ( const char *  host,
short  port,
long timeout_sec  TSRMLS_DC 
)
int ftp_pasv ( ftpbuf_t ftp,
int  pasv 
)
int ftp_put ( ftpbuf_t ftp,
const char *  path,
php_stream *  instream,
ftptype_t  type,
int startpos  TSRMLS_DC 
)
const char* ftp_pwd ( ftpbuf_t ftp)
int ftp_quit ( ftpbuf_t ftp)
void ftp_raw ( ftpbuf_t ftp,
const char *  cmd,
zval *  return_value 
)
int ftp_reinit ( ftpbuf_t ftp)
int ftp_rename ( ftpbuf_t ftp,
const char *  src,
const char *  dest 
)
int ftp_rmdir ( ftpbuf_t ftp,
const char *  dir 
)
int ftp_site ( ftpbuf_t ftp,
const char *  cmd 
)
int ftp_size ( ftpbuf_t ftp,
const char *  path 
)
const char* ftp_syst ( ftpbuf_t ftp)