PHP Class Deployment\FtpServer

Inheritance: implements deployment\Server
Afficher le fichier Open project: dg/ftp-deployment

Méthodes publiques

Méthode Description
__construct ( $url, $passiveMode = TRUE )
connect ( ) : void Connects to FTP server.
createDir ( $dir ) : void Creates directories on FTP server.
execute ( $command ) : string Executes a command on a remote server.
getDir ( ) : string Returns current directory.
purge ( $dir, callable $progress = NULL ) : void Recursive deletes content of directory or file.
readFile ( $remote, $local ) : void Reads remote file from FTP server.
removeDir ( $dir ) : void Removes directory from FTP server if exists.
removeFile ( $file ) : void Removes file from FTP server if exists.
renameFile ( $old, $new ) : void Renames and rewrites file on FTP server.
writeFile ( $local, $remote, callable $progress = NULL ) : void Uploads file to FTP server.

Private Methods

Méthode Description
ftp ( $cmd ) : mixed
isDir ( $dir ) : boolean Checks if directory exists.
protect ( callable $func, $args = [] )

Method Details

__construct() public méthode

public __construct ( $url, $passiveMode = TRUE )

connect() public méthode

Connects to FTP server.
public connect ( ) : void
Résultat void

createDir() public méthode

Creates directories on FTP server.
public createDir ( $dir ) : void
Résultat void

execute() public méthode

Executes a command on a remote server.
public execute ( $command ) : string
Résultat string

getDir() public méthode

Returns current directory.
public getDir ( ) : string
Résultat string

purge() public méthode

Recursive deletes content of directory or file.
public purge ( $dir, callable $progress = NULL ) : void
$progress callable
Résultat void

readFile() public méthode

Reads remote file from FTP server.
public readFile ( $remote, $local ) : void
Résultat void

removeDir() public méthode

Removes directory from FTP server if exists.
public removeDir ( $dir ) : void
Résultat void

removeFile() public méthode

Removes file from FTP server if exists.
public removeFile ( $file ) : void
Résultat void

renameFile() public méthode

Renames and rewrites file on FTP server.
public renameFile ( $old, $new ) : void
Résultat void

writeFile() public méthode

Uploads file to FTP server.
public writeFile ( $local, $remote, callable $progress = NULL ) : void
$progress callable
Résultat void