Overview

Packages

  • Vfs

Classes

  • Horde_Vfs
  • Horde_Vfs_Base
  • Horde_Vfs_Browser
  • Horde_Vfs_Exception
  • Horde_Vfs_File
  • Horde_Vfs_Ftp
  • Horde_Vfs_Gc
  • Horde_Vfs_Horde
  • Horde_Vfs_Kolab
  • Horde_Vfs_ListItem
  • Horde_Vfs_Musql
  • Horde_Vfs_Object
  • Horde_Vfs_Smb
  • Horde_Vfs_Sql
  • Horde_Vfs_SqlFile
  • Horde_Vfs_Ssh2
  • Horde_Vfs_Translation
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Vfs_Ssh2

VFS implementation for an SSH2 server. This module requires the SSH2 (version 0.10+) PECL package.

Required values for $params:

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-2012 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.

Horde_Vfs_Base
Extended by Horde_Vfs_Ssh2
Package: Vfs
Editor: Cliff Green green@umdnj.edu
Located at Horde/Vfs/Ssh2.php
Methods summary
public integer
# size( string $path, string $name )

Returns the size of a file.

Returns the size of a file.

Parameters

$path
The path of the file.
$name
The filename.

Returns

integer
The size of the file in bytes.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::size()
public string
# read( string $path, string $name )

Retrieves a file from the VFS.

Retrieves a file from the VFS.

Parameters

$path
The pathname to the file.
$name
The filename to retrieve.

Returns

string
The file data.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::read()
public string
# readFile( string $path, string $name )

Retrieves a file from the VFS as an on-disk local file.

Retrieves a file from the VFS as an on-disk local file.

This function provides a file on local disk with the data of a VFS file in it. This file cannot be modified! The behavior if you do modify it is undefined. It will be removed at the end of the request.

Parameters

$path
The pathname to the file.
$name
The filename to retrieve.

Returns

string
A local filename.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::readFile()
public resource
# readStream( string $path, string $name )

Open a stream to a file in the VFS.

Open a stream to a file in the VFS.

Parameters

$path
The pathname to the file.
$name
The filename to retrieve.

Returns

resource
The stream.

Throws

Horde_Vfs_Exception
public
# write( string $path, string $name, string $tmpFile, boolean $autocreate = false )

Stores a file in the VFS.

Stores a file in the VFS.

Parameters

$path
The path to store the file in.
$name
The filename to use.
$tmpFile
<p>The temporary file containing the data to be stored.</p>
$autocreate
Automatically create directories?

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::write()
public
# writeData( string $path, string $name, string $data, boolean $autocreate = false )

Stores a file in the VFS from raw data.

Stores a file in the VFS from raw data.

Parameters

$path
The path to store the file in.
$name
The filename to use.
$data
The file data.
$autocreate
Automatically create directories?

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::writeData()
public
# deleteFile( string $path, string $name )

Deletes a file from the VFS.

Deletes a file from the VFS.

Parameters

$path
The path to delete the file from.
$name
The filename to delete.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::deleteFile()
public boolean
# isFolder( string $path, string $name )

Checks if a given item is a folder.

Checks if a given item is a folder.

Parameters

$path
The parent folder.
$name
The item name.

Returns

boolean
True if it is a folder, false otherwise.

Overrides

Horde_Vfs_Base::isFolder()
public
# deleteFolder( string $path, string $name, boolean $recursive = false )

Deletes a folder from the VFS.

Deletes a folder from the VFS.

Parameters

$path
The parent folder.
$name
The name of the folder to delete.
$recursive
Force a recursive delete?

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::deleteFolder()
public
# rename( string $oldpath, string $oldname, string $newpath, string $newname )

Renames a file in the VFS.

Renames a file in the VFS.

Parameters

$oldpath
The old path to the file.
$oldname
The old filename.
$newpath
The new path of the file.
$newname
The new filename.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::rename()
public
# createFolder( string $path, string $name )

Creates a folder on the VFS.

Creates a folder on the VFS.

Parameters

$path
The parent folder.
$name
The name of the new folder.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::createFolder()
public
# changePermissions( string $path, string $name, string $permission )

Changes permissions for an item on the VFS.

Changes permissions for an item on the VFS.

Parameters

$path
The parent folder of the item.
$name
The name of the item.
$permission
The permission to set in octal notation.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::changePermissions()
public boolean
# exists( string $path, string $name )

Returns if a given file or folder exists in a folder.

Returns if a given file or folder exists in a folder.

Parameters

$path
The path to the folder.
$name
The file or folder name.

Returns

boolean
True if it exists, false otherwise.

Overrides

Horde_Vfs_Base::exists()
public array
# listFolders( string $path = '', mixed $filter = null, boolean $dotfolders = true )

Returns a sorted list of folders in the specified directory.

Returns a sorted list of folders in the specified directory.

Parameters

$path
<p>The path of the directory to get the directory list for.</p>
$filter
Hash of items to filter based on folderlist.
$dotfolders
Include dotfolders?

Returns

array
Folder list.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::listFolders()
public
# copy( string $path, string $name, string $dest, boolean $autocreate = false )

Copies a file through the backend.

Copies a file through the backend.

Parameters

$path
The path of the original file.
$name
The name of the original file.
$dest
The name of the destination directory.
$autocreate
<p>Auto-create the directory if it doesn't exist?</p>

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::copy()
public
# move( string $path, string $name, string $dest, boolean $autocreate = false )

Moves a file through the backend.

Moves a file through the backend.

Parameters

$path
The path of the original file.
$name
The name of the original file.
$dest
The destination file name.
$autocreate
<p>Auto-create the directory if it doesn't exist?</p>

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::move()
public string
# getCurrentDirectory( )

Returns the current working directory on the SSH2 server.

Returns the current working directory on the SSH2 server.

Returns

string
The current working directory.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::getCurrentDirectory()
Methods inherited from Horde_Vfs_Base
__construct(), autocreatePath(), checkCredentials(), delete(), emptyFolder(), getFolderSize(), getModifiablePermissions(), getParam(), getQuota(), getRequiredCredentials(), getVFSSize(), listFolder(), readByteRange(), setParams(), setQuota(), setQuotaRoot()
API documentation generated by ApiGen