Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
mdkir ($name) | |
mkdirRecursive ($path, $mode=0777) | |
login ($login="anonymous", $password="[email protected]") | |
validateConnectionString ($string) | |
connect ($string, $timeout=900) | |
fput ($remoteFile, $handle, $mode=FTP_BINARY, $startPos=0) | |
put ($remoteFile, $localFile, $mode=FTP_BINARY, $startPos=0) | |
getcwd () | |
raw ($cmd) | |
upload ($remote, $local, $dirMode=0777, $ftpMode=FTP_BINARY) | |
download ($remote, $local, $ftpMode=FTP_BINARY) | |
pasv ($pasv) | |
close () | |
chmod ($mode, $remoteFile) | |
chdir ($dir) | |
cdup () | |
get ($localFile, $remoteFile, $fileMode=FTP_BINARY, $resumeOffset=0) | |
nlist ($dir="/") | |
rawlist ($dir="/", $recursive=false) | |
fileExists ($path, $excludeIfIsDir=true) | |
ls ($dir="/", $recursive=false) | |
correctFilePath ($str) | |
delete ($file) | |
Static Public Member Functions | |
static | byteconvert ($bytes) |
static | chmodnum ($chmod) |
Protected Member Functions | |
checkConnected () | |
Protected Attributes | |
$_conn = false | |
|
static |
chdir | ( | $dir | ) |
|
protected |
chmod | ( | $mode, | |
$remoteFile | |||
) |
ftp_chmod wrapper
int | $mode | |
string | $remoteFile |
Definition at line 305 of file Ftp.php.
|
static |
Chmod string "-rwxrwxrwx" to "777" converter
string | $chmod |
close | ( | ) |
connect | ( | $string, | |
$timeout = 900 |
|||
) |
Connect to server using connect string Connection string: ftp://user:pass@server:port/path user,pass,port,path are optional parts
string | $string | |
int | $timeout |
Definition at line 127 of file Ftp.php.
correctFilePath | ( | $str | ) |
delete | ( | $file | ) |
download | ( | $remote, | |
$local, | |||
$ftpMode = FTP_BINARY |
|||
) |
fileExists | ( | $path, | |
$excludeIfIsDir = true |
|||
) |
fput | ( | $remoteFile, | |
$handle, | |||
$mode = FTP_BINARY , |
|||
$startPos = 0 |
|||
) |
ftp_fput wrapper
string | $remoteFile | |
resource | $handle | |
int | $mode | FTP_BINARY | FTP_ASCII |
int | $startPos |
Definition at line 158 of file Ftp.php.
get | ( | $localFile, | |
$remoteFile, | |||
$fileMode = FTP_BINARY , |
|||
$resumeOffset = 0 |
|||
) |
getcwd | ( | ) |
login | ( | $login = "anonymous" , |
|
$password = "[email protected]" |
|||
) |
ls | ( | $dir = "/" , |
|
$recursive = false |
|||
) |
mdkir | ( | $name | ) |
mkdirRecursive | ( | $path, | |
$mode = 0777 |
|||
) |
Make dir recursive
string | $path | |
int | $mode |
Definition at line 53 of file Ftp.php.
nlist | ( | $dir = "/" | ) |
pasv | ( | $pasv | ) |
put | ( | $remoteFile, | |
$localFile, | |||
$mode = FTP_BINARY , |
|||
$startPos = 0 |
|||
) |
ftp_put wrapper
string | $remoteFile | |
string | $localFile | |
int | $mode | FTP_BINARY | FTP_ASCII |
int | $startPos |
Definition at line 173 of file Ftp.php.
raw | ( | $cmd | ) |
rawlist | ( | $dir = "/" , |
|
$recursive = false |
|||
) |
upload | ( | $remote, | |
$local, | |||
$dirMode = 0777 , |
|||
$ftpMode = FTP_BINARY |
|||
) |
Upload local file to remote
Can be used for relative and absoulte remote paths Relative: use chdir before calling this
string | $remote | |
string | $local | |
int | $dirMode | |
int | $ftpMode |
Definition at line 226 of file Ftp.php.
validateConnectionString | ( | $string | ) |