dolibarr 20.0.0
ftp.lib.php File Reference

Set of functions used for FTP. More...

Go to the source code of this file.

Functions

 dol_ftp_connect ($ftp_server, $ftp_port, $ftp_user, $ftp_password, $section, $ftp_passive=0)
 Connect to FTP server.
 
 ftp_isdir ($connect_id, $dir)
 Tell if an entry is a FTP directory.
 
 dol_ftp_close ($connect_id)
 Tell if an entry is a FTP directory.
 
 dol_ftp_delete ($connect_id, $file, $newsection)
 Delete a FTP file.
 
 dol_ftp_get ($connect_id, $localfile, $file, $newsection)
 Download a FTP file.
 
 dol_ftp_put ($connect_id, $file, $localfile, $newsection)
 Upload a FTP file.
 
 dol_ftp_rmdir ($connect_id, $file, $newsection)
 Remove FTP directory.
 
 dol_ftp_mkdir ($connect_id, $newdir, $newsection)
 Remove FTP directory.
 

Detailed Description

Set of functions used for FTP.

Definition in file ftp.lib.php.

Function Documentation

◆ dol_ftp_close()

dol_ftp_close ( $connect_id)

Tell if an entry is a FTP directory.

Parameters
resource$connect_idConnection handler
Returns
boolean Result of closing

Definition at line 144 of file ftp.lib.php.

References getDolGlobalString().

◆ dol_ftp_connect()

dol_ftp_connect ( $ftp_server,
$ftp_port,
$ftp_user,
$ftp_password,
$section,
$ftp_passive = 0 )

Connect to FTP server.

Parameters
string$ftp_serverServer name
string$ftp_portServer port
string$ftp_userFTP user
string$ftp_passwordFTP password
string$sectionDirectory
integer$ftp_passiveUse a passive mode
Returns
array Result of connect

Definition at line 39 of file ftp.lib.php.

References dol_syslog(), and getDolGlobalString().

◆ dol_ftp_delete()

dol_ftp_delete ( $connect_id,
$file,
$newsection )

Delete a FTP file.

Parameters
resource$connect_idConnection handler
string$fileFile
string$newsection$newsection
Returns
bool

Definition at line 165 of file ftp.lib.php.

References dol_syslog(), and getDolGlobalString().

◆ dol_ftp_get()

dol_ftp_get ( $connect_id,
$localfile,
$file,
$newsection )

Download a FTP file.

Parameters
resource$connect_idConnection handler
string$localfileThe local file path
string$fileThe remote file path
string$newsection$newsection
Returns
bool|resource

Definition at line 196 of file ftp.lib.php.

References getDolGlobalString().

◆ dol_ftp_mkdir()

dol_ftp_mkdir ( $connect_id,
$newdir,
$newsection )

Remove FTP directory.

Parameters
resource$connect_idConnection handler
string$newdirDir create
string$newsection$newsection
Returns
bool|string

Definition at line 282 of file ftp.lib.php.

References getDolGlobalString().

◆ dol_ftp_put()

dol_ftp_put ( $connect_id,
$file,
$localfile,
$newsection )

Upload a FTP file.

Parameters
resource$connect_idConnection handler
string$fileFile name
string$localfileThe path to the local file
string$newsection$newsection
Returns
bool

Definition at line 225 of file ftp.lib.php.

References getDolGlobalString().

◆ dol_ftp_rmdir()

dol_ftp_rmdir ( $connect_id,
$file,
$newsection )

Remove FTP directory.

Parameters
resource$connect_idConnection handler
string$fileFile
string$newsection$newsection
Returns
bool

Definition at line 253 of file ftp.lib.php.

References getDolGlobalString().

◆ ftp_isdir()

ftp_isdir ( $connect_id,
$dir )

Tell if an entry is a FTP directory.

Parameters
resource$connect_idConnection handler
string$dirDirectory
Returns
int 1=directory, 0=not a directory

Definition at line 128 of file ftp.lib.php.