Property | Type | Description | |
---|---|---|---|
$create | |||
$directory | |||
$initialized | |||
$sftp |
Method | Description | |
---|---|---|
__construct ( Ssh\Sftp $sftp, string $directory = null, boolean $create = false ) | ||
checksum ( $key ) | ||
computeKey ( string $path ) : string | Computes the key from the specified path. | |
delete ( $key ) | ||
exists ( $key ) | ||
isDirectory ( $key ) | ||
keys ( ) | ||
mtime ( $key ) | ||
read ( $key ) | ||
rename ( $sourceKey, $targetKey ) | ||
write ( $key, $content ) |
Method | Description | |
---|---|---|
computePath ( string $key ) : string | Computes the path for the specified key. | |
createDirectory ( string $directory ) : boolean | Creates the specified directory and its parents. | |
ensureDirectoryExists ( string $directory, boolean $create = false ) | Ensures the specified directory exists. | |
initialize ( ) | Performs the adapter's initialization. |
public __construct ( Ssh\Sftp $sftp, string $directory = null, boolean $create = false ) | ||
$sftp | Ssh\Sftp | An Sftp instance |
$directory | string | The distant directory |
$create | boolean | Whether to create the remote directory if it does not exist |
public computeKey ( string $path ) : string | ||
$path | string | |
return | string |
protected computePath ( string $key ) : string | ||
$key | string | |
return | string |
protected createDirectory ( string $directory ) : boolean | ||
$directory | string | The directory to create |
return | boolean | TRUE on success, or FALSE on failure |
protected ensureDirectoryExists ( string $directory, boolean $create = false ) | ||
$directory | string | The directory that we ensure the existence |
$create | boolean | Whether to create it if it does not exist |