WARNING: This is untested. It is not currently used, but should do the trick.
Overrides FileTransfer::isDirectory
public function isDirectory($path) {
$directory = escapeshellarg($path);
$cmd = "[ -d {$directory} ] && echo 'yes'";
if ($output = @ssh2_exec($this->connection, $cmd)) {
if ($output == 'yes') {
return TRUE;
}
return FALSE;
}
else {
throw new FileTransferException('Cannot check @path.', NULL, array(
'@path' => $path,
));
}
}