php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
ftp.c File Reference
#include "php.h"
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
#include <time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <errno.h>
#include "ftp.h"
#include "ext/standard/fsock.h"

Go to the source code of this file.

Data Structures

union  ipbox
 

Functions

ftpbuf_tftp_open (const char *host, short port, zend_long timeout_sec)
 
ftpbuf_tftp_close (ftpbuf_t *ftp)
 
void ftp_gc (ftpbuf_t *ftp)
 
int ftp_quit (ftpbuf_t *ftp)
 
int ftp_login (ftpbuf_t *ftp, const char *user, const size_t user_len, const char *pass, const size_t pass_len)
 
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, const size_t cmd_len)
 
void ftp_raw (ftpbuf_t *ftp, const char *cmd, const size_t cmd_len, zval *return_value)
 
int ftp_chdir (ftpbuf_t *ftp, const char *dir, const size_t dir_len)
 
int ftp_cdup (ftpbuf_t *ftp)
 
zend_stringftp_mkdir (ftpbuf_t *ftp, const char *dir, const size_t dir_len)
 
int ftp_rmdir (ftpbuf_t *ftp, const char *dir, const size_t dir_len)
 
int ftp_chmod (ftpbuf_t *ftp, const int mode, const char *filename, const int filename_len)
 
int ftp_alloc (ftpbuf_t *ftp, const zend_long size, zend_string **response)
 
char ** ftp_nlist (ftpbuf_t *ftp, const char *path, const size_t path_len)
 
char ** ftp_list (ftpbuf_t *ftp, const char *path, const size_t path_len, int recursive)
 
char ** ftp_mlsd (ftpbuf_t *ftp, const char *path, const size_t path_len)
 
int ftp_mlsd_parse_line (HashTable *ht, const char *input)
 
int ftp_pasv (ftpbuf_t *ftp, int pasv)
 
int ftp_get (ftpbuf_t *ftp, php_stream *outstream, const char *path, const size_t path_len, ftptype_t type, zend_long resumepos)
 
int ftp_put (ftpbuf_t *ftp, const char *path, const size_t path_len, php_stream *instream, ftptype_t type, zend_long startpos)
 
int ftp_append (ftpbuf_t *ftp, const char *path, const size_t path_len, php_stream *instream, ftptype_t type)
 
zend_long ftp_size (ftpbuf_t *ftp, const char *path, const size_t path_len)
 
time_t ftp_mdtm (ftpbuf_t *ftp, const char *path, const size_t path_len)
 
int ftp_delete (ftpbuf_t *ftp, const char *path, const size_t path_len)
 
int ftp_rename (ftpbuf_t *ftp, const char *src, const size_t src_len, const char *dest, const size_t dest_len)
 
int ftp_site (ftpbuf_t *ftp, const char *cmd, const size_t cmd_len)
 
int single_send (ftpbuf_t *ftp, php_socket_t s, void *buf, size_t size)
 
int data_available (ftpbuf_t *ftp, php_socket_t s)
 
int data_writeable (ftpbuf_t *ftp, php_socket_t s)
 
int ftp_nb_get (ftpbuf_t *ftp, php_stream *outstream, const char *path, const size_t path_len, ftptype_t type, zend_long resumepos)
 
int ftp_nb_continue_read (ftpbuf_t *ftp)
 
int ftp_nb_put (ftpbuf_t *ftp, const char *path, const size_t path_len, php_stream *instream, ftptype_t type, zend_long startpos)
 
int ftp_nb_continue_write (ftpbuf_t *ftp)
 

Function Documentation

◆ data_available()

int data_available ( ftpbuf_t * ftp,
php_socket_t s )

Definition at line 1627 of file ftp.c.

◆ data_writeable()

int data_writeable ( ftpbuf_t * ftp,
php_socket_t s )

Definition at line 1650 of file ftp.c.

◆ ftp_alloc()

int ftp_alloc ( ftpbuf_t * ftp,
const zend_long size,
zend_string ** response )

Definition at line 657 of file ftp.c.

◆ ftp_append()

int ftp_append ( ftpbuf_t * ftp,
const char * path,
const size_t path_len,
php_stream * instream,
ftptype_t type )

Definition at line 1110 of file ftp.c.

◆ ftp_cdup()

int ftp_cdup ( ftpbuf_t * ftp)

Definition at line 554 of file ftp.c.

◆ ftp_chdir()

int ftp_chdir ( ftpbuf_t * ftp,
const char * dir,
const size_t dir_len )

Definition at line 531 of file ftp.c.

◆ ftp_chmod()

int ftp_chmod ( ftpbuf_t * ftp,
const int mode,
const char * filename,
const int filename_len )

Definition at line 625 of file ftp.c.

◆ ftp_close()

ftpbuf_t * ftp_close ( ftpbuf_t * ftp)

Definition at line 165 of file ftp.c.

◆ ftp_delete()

int ftp_delete ( ftpbuf_t * ftp,
const char * path,
const size_t path_len )

Definition at line 1220 of file ftp.c.

◆ ftp_exec()

int ftp_exec ( ftpbuf_t * ftp,
const char * cmd,
const size_t cmd_len )

Definition at line 493 of file ftp.c.

◆ ftp_gc()

void ftp_gc ( ftpbuf_t * ftp)

Definition at line 195 of file ftp.c.

◆ ftp_get()

int ftp_get ( ftpbuf_t * ftp,
php_stream * outstream,
const char * path,
const size_t path_len,
ftptype_t type,
zend_long resumepos )

Definition at line 886 of file ftp.c.

◆ ftp_list()

char ** ftp_list ( ftpbuf_t * ftp,
const char * path,
const size_t path_len,
int recursive )

Definition at line 702 of file ftp.c.

◆ ftp_login()

int ftp_login ( ftpbuf_t * ftp,
const char * user,
const size_t user_len,
const char * pass,
const size_t pass_len )

Definition at line 253 of file ftp.c.

◆ ftp_mdtm()

time_t ftp_mdtm ( ftpbuf_t * ftp,
const char * path,
const size_t path_len )

Definition at line 1173 of file ftp.c.

◆ ftp_mkdir()

zend_string * ftp_mkdir ( ftpbuf_t * ftp,
const char * dir,
const size_t dir_len )

Definition at line 577 of file ftp.c.

◆ ftp_mlsd()

char ** ftp_mlsd ( ftpbuf_t * ftp,
const char * path,
const size_t path_len )

Definition at line 710 of file ftp.c.

◆ ftp_mlsd_parse_line()

int ftp_mlsd_parse_line ( HashTable * ht,
const char * input )

Definition at line 718 of file ftp.c.

◆ ftp_nb_continue_read()

int ftp_nb_continue_read ( ftpbuf_t * ftp)

Definition at line 2210 of file ftp.c.

◆ ftp_nb_continue_write()

int ftp_nb_continue_write ( ftpbuf_t * ftp)

Definition at line 2325 of file ftp.c.

◆ ftp_nb_get()

int ftp_nb_get ( ftpbuf_t * ftp,
php_stream * outstream,
const char * path,
const size_t path_len,
ftptype_t type,
zend_long resumepos )

Definition at line 2144 of file ftp.c.

◆ ftp_nb_put()

int ftp_nb_put ( ftpbuf_t * ftp,
const char * path,
const size_t path_len,
php_stream * instream,
ftptype_t type,
zend_long startpos )

Definition at line 2272 of file ftp.c.

◆ ftp_nlist()

char ** ftp_nlist ( ftpbuf_t * ftp,
const char * path,
const size_t path_len )

Definition at line 694 of file ftp.c.

◆ ftp_open()

ftpbuf_t * ftp_open ( const char * host,
short port,
zend_long timeout_sec )

Definition at line 117 of file ftp.c.

◆ ftp_pasv()

int ftp_pasv ( ftpbuf_t * ftp,
int pasv )

Definition at line 793 of file ftp.c.

◆ ftp_put()

int ftp_put ( ftpbuf_t * ftp,
const char * path,
const size_t path_len,
php_stream * instream,
ftptype_t type,
zend_long startpos )

Definition at line 1052 of file ftp.c.

◆ ftp_pwd()

const char * ftp_pwd ( ftpbuf_t * ftp)

Definition at line 460 of file ftp.c.

◆ ftp_quit()

int ftp_quit ( ftpbuf_t * ftp)

Definition at line 213 of file ftp.c.

◆ ftp_raw()

void ftp_raw ( ftpbuf_t * ftp,
const char * cmd,
const size_t cmd_len,
zval * return_value )

Definition at line 511 of file ftp.c.

◆ ftp_reinit()

int ftp_reinit ( ftpbuf_t * ftp)

Definition at line 402 of file ftp.c.

◆ ftp_rename()

int ftp_rename ( ftpbuf_t * ftp,
const char * src,
const size_t src_len,
const char * dest,
const size_t dest_len )

Definition at line 1238 of file ftp.c.

◆ ftp_rmdir()

int ftp_rmdir ( ftpbuf_t * ftp,
const char * dir,
const size_t dir_len )

Definition at line 608 of file ftp.c.

◆ ftp_site()

int ftp_site ( ftpbuf_t * ftp,
const char * cmd,
const size_t cmd_len )

Definition at line 1261 of file ftp.c.

◆ ftp_size()

zend_long ftp_size ( ftpbuf_t * ftp,
const char * path,
const size_t path_len )

Definition at line 1153 of file ftp.c.

◆ ftp_syst()

const char * ftp_syst ( ftpbuf_t * ftp)

Definition at line 425 of file ftp.c.

◆ single_send()

int single_send ( ftpbuf_t * ftp,
php_socket_t s,
void * buf,
size_t size )

Definition at line 1426 of file ftp.c.