wCMF
3.6
|
Public Member Functions | |
getErrorMsg () | |
open ($params) | |
getFiles ($directory='.', $pattern='/./', $prependDirectoryName=false, $recursive=false) | |
getFileInfo ($file) | |
copy ($file, $transferMode, $toDir='./', $createDir=true, $destName=null) | |
synchronize ($localFile, $remoteFile) | |
delete ($file) | |
close () | |
Public Attributes | |
$_errorMsg = '' | |
$_ftpConnId = null | |
$_ftpRootDir = '' | |
FTPUtil provides support for ftp functionality.
wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH
Licensed under the terms of any of the following licenses at your choice:
See the license.txt file distributed with this work for additional information.
Definition at line 27 of file class.FTPUtil.php.
FTPUtil::getErrorMsg | ( | ) |
Get last error message.
Definition at line 37 of file class.FTPUtil.php.
References $_errorMsg.
FTPUtil::open | ( | $params | ) |
Open a FTP connection to a given server.
params | Initialization data given in an assoziative array with the following keys: server, port, login, password |
Definition at line 47 of file class.FTPUtil.php.
FTPUtil::getFiles | ( | $directory = '.' , |
|
$pattern = '/./' , |
|||
$prependDirectoryName = false , |
|||
$recursive = false |
|||
) |
Definition at line 94 of file class.FTPUtil.php.
FTPUtil::getFileInfo | ( | $file | ) |
Get size an modification date of a remote file.
file | The name of the file to get the info for |
Definition at line 133 of file class.FTPUtil.php.
Referenced by synchronize().
FTPUtil::copy | ( | $file, | |
$transferMode, | |||
$toDir = './' , |
|||
$createDir = true , |
|||
$destName = null |
|||
) |
Transfer a file to a given server via FTP.
file | The name of the file to transfer (path relative to the script) |
transferMode | The transfer mode [FTP_ASCII | FTP_BINARY] |
toDir | The server upload directory (relative to serverroot) [default: './'] |
createDir | True/False wether to create the directory if not existing [default: true] |
destName | The destination file / the same as the source file if null [default: null] |
Definition at line 158 of file class.FTPUtil.php.
Referenced by synchronize().
FTPUtil::synchronize | ( | $localFile, | |
$remoteFile | |||
) |
Synchronize a file on the server. The method copies the local file to the server if the remote file does not exist, differs in size or is older than the local file.
localFile | The name of the local file (path relative to the script) |
remoteFile | The name of the remote file (path relative to serverroot) |
Definition at line 212 of file class.FTPUtil.php.
References copy(), and getFileInfo().
FTPUtil::delete | ( | $file | ) |
Delete a remote file.
file | The name of the file to delete |
Definition at line 240 of file class.FTPUtil.php.
FTPUtil::close | ( | ) |
Close a FTP connection to a given server.
Definition at line 253 of file class.FTPUtil.php.
FTPUtil::$_errorMsg = '' |
Definition at line 29 of file class.FTPUtil.php.
Referenced by getErrorMsg().
FTPUtil::$_ftpConnId = null |
Definition at line 30 of file class.FTPUtil.php.
FTPUtil::$_ftpRootDir = '' |
Definition at line 31 of file class.FTPUtil.php.