SORT_ASC
SORT_ASC
Defines the sort direction as ascending
SFTP handler
loc(string $dir) : \Alo\SFTP
Sets the local directory
string | $dir | The directory path |
checkSubsystem() : \Alo\SFTP
Checks if the SFTP subsystem was initialised
connect(integer $attempt) : \Alo\SFTP
Creates a SSH2 connection
integer | $attempt | Current attempt number |
When the connection ultimately fails
downloadFile(string $file) : \Alo\SFTP
Downloads a file to $this->local_dir
string | $file | Remote file name |
url(string $url = '') : \Alo\SFTP
If no parameter is passed gets the SFTP server URL, otherwise sets it.
string | $url |
When the URL is not a string
user(string $user = '') : \Alo\SFTP
If no parameter is passed gets the SFTP username, otherwise sets it.
string | $user | The username |
When $user isn't scalar
pubkey(string $pubkey = '') : \Alo\SFTP
Sets the SFTP public key path
string | $pubkey | The path |
When $pubkey isn't a string
privkey(string $privkey = '') : \Alo\SFTP
If no parameter is passed gets the SFTP private key path, otherwise sets it
string | $privkey | The path |
When the $privkey isn't a string
pw(string $pw = '') : \Alo\SFTP
If no parameter is passed gets the SFTP private key password, otherwise sets it
string | $pw | The password |
When the password isn't scalar
dir(mixed $dir = -1) : \Alo\SFTP
If no argument is passed, gets the working directory, otherwise sets it.
mixed | $dir |
When the name is invalid
auth(integer $attempt) : \Alo\SFTP
Authenticates the SSH2 connection
integer | $attempt | The current attempt # at authentication |
When authentication permanently fails
ssh2_sftp(integer $attempt) : \Alo\SFTP
Initialises the SFTP subsystem
integer | $attempt | Current retry number |
When initialising the SFTP system permanently fails