PHP Interface Deployment\Server

显示文件 Open project: dg/ftp-deployment Interface Usage Examples

Public Methods

Method Description
connect ( ) : void Connects to server.
createDir ( $dir ) : void Creates directories on server. Path is absolute.
execute ( $command ) : string Executes a command on a remote server.
getDir ( ) : string Returns current directory.
purge ( $path, callable $progress = NULL ) : void Recursive deletes content of directory or file. Path is absolute.
readFile ( $remote, $local ) : void Reads file from server. Paths are absolute.
removeDir ( $dir ) : void Removes directory from server if exists. Path is absolute.
removeFile ( $file ) : void Removes file from server if exists. Path is absolute.
renameFile ( $old, $new ) : void Renames and rewrites file on server. Paths are absolute.
writeFile ( $local, $remote, callable $progress = NULL ) : void Uploads file to server. Paths are absolute.

Method Details

connect() public method

Connects to server.
public connect ( ) : void
return void

createDir() public method

Creates directories on server. Path is absolute.
public createDir ( $dir ) : void
return void

execute() public method

Executes a command on a remote server.
public execute ( $command ) : string
return string

getDir() public method

Returns current directory.
public getDir ( ) : string
return string

purge() public method

Recursive deletes content of directory or file. Path is absolute.
public purge ( $path, callable $progress = NULL ) : void
$progress callable
return void

readFile() public method

Reads file from server. Paths are absolute.
public readFile ( $remote, $local ) : void
return void

removeDir() public method

Removes directory from server if exists. Path is absolute.
public removeDir ( $dir ) : void
return void

removeFile() public method

Removes file from server if exists. Path is absolute.
public removeFile ( $file ) : void
return void

renameFile() public method

Renames and rewrites file on server. Paths are absolute.
public renameFile ( $old, $new ) : void
return void

writeFile() public method

Uploads file to server. Paths are absolute.
public writeFile ( $local, $remote, callable $progress = NULL ) : void
$progress callable
return void