username - (string) The username with which to connect to the ssh2 server. password - (string) The password with which to connect to the ssh2 server. hostspec - (string) The ssh2 server to connect to.Optional values for $params:
port - (integer) The port used to connect to the ssh2 server if other than 22.Copyright 2006-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21. ファイルを表示 Open project: horde/horde
Property | Type | Description | |
---|---|---|---|
$_credentials | array | List of additional credentials required for this VFS backend. | |
$_cwd | string | The current working directory. | |
$_gids | array | Local cache array for group IDs. | |
$_permissions | array | List of permissions and if they can be changed in this VFS backend. | |
$_sftp | resource | The SFTP resource stream. | |
$_stream | resource | Variable holding the connection to the ssh2 server. | |
$_uids | array | Local cache array for user IDs. |
Method | Description | |
---|---|---|
changePermissions ( string $path, string $name, string $permission ) | Changes permissions for an item on the VFS. | |
copy ( string $path, string $name, string $dest, boolean $autocreate = false ) | Copies a file through the backend. | |
createFolder ( string $path, string $name ) | Creates a folder on the VFS. | |
deleteFile ( string $path, string $name ) | Deletes a file from the VFS. | |
deleteFolder ( string $path, string $name, boolean $recursive = false ) | Deletes a folder from the VFS. | |
exists ( string $path, string $name ) : boolean | Returns if a given file or folder exists in a folder. | |
getCurrentDirectory ( ) : string | Returns the current working directory on the SSH2 server. | |
isFolder ( string $path, string $name ) : boolean | Checks if a given item is a folder. | |
move ( string $path, string $name, string $dest, boolean $autocreate = false ) | Moves a file through the backend. | |
read ( string $path, string $name ) : string | Retrieves a file from the VFS. | |
readFile ( string $path, string $name ) : string | Retrieves a file from the VFS as an on-disk local file. | |
readStream ( string $path, string $name ) : resource | Open a stream to a file in the VFS. | |
rename ( string $oldpath, string $oldname, string $newpath, string $newname ) | Renames a file in the VFS. | |
size ( string $path, string $name ) : integer | Returns the size of a file. | |
write ( string $path, string $name, string $tmpFile, boolean $autocreate = false ) | Stores a file in the VFS. | |
writeData ( string $path, string $name, string $data, boolean $autocreate = false ) | Stores a file in the VFS from raw data. |
Method | Description | |
---|---|---|
_connect ( ) | Attempts to open a connection to the SSH2 server. | |
_getPath ( string $path, string $name ) : mixed | Returns the full path of an item. | |
_listFolder ( string $path = '', string | array $filter = null, boolean $dotfiles = true, boolean $dironly = false ) : array | Returns an unsorted file list of the specified directory. | |
_parentDir ( string $path ) : string | Returns the parent directory of the specified path. | |
_recv ( string $remote, string $local ) : boolean | Receives file from remote host. | |
_send ( string $local, string $remote ) : boolean | Sends local file to remote host. | |
_setPath ( string $path ) | Changes the current directory on the server. | |
_wrap ( string $remote ) : string | Generate a stream wrapper file spec for a remote file path |
protected _connect ( ) |
protected _listFolder ( string $path = '', string | array $filter = null, boolean $dotfiles = true, boolean $dironly = false ) : array | ||
$path | string | The path of the directory. |
$filter | string | array | Regular expression(s) to filter file/directory name on. |
$dotfiles | boolean | Show dotfiles? |
$dironly | boolean | Show only directories? |
return | array | File list. |
protected _parentDir ( string $path ) : string | ||
$path | string | The path to get the parent of. |
return | string | The parent directory. |
public createFolder ( string $path, string $name ) | ||
$path | string | The parent folder. |
$name | string | The name of the new folder. |
public deleteFile ( string $path, string $name ) | ||
$path | string | The path to delete the file from. |
$name | string | The filename to delete. |
public getCurrentDirectory ( ) : string | ||
return | string | The current working directory. |
public readStream ( string $path, string $name ) : resource | ||
$path | string | The pathname to the file. |
$name | string | The filename to retrieve. |
return | resource | The stream. |
protected array $_credentials | ||
return | array |
protected array $_permissions | ||
return | array |
protected resource $_stream | ||
return | resource |