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_Ftp

VFS implementation for an FTP server.

Required values for $params:

username - (string) The username with which to connect to the ftp server.
password - (string) The password with which to connect to the ftp server.
hostspec - (string) The ftp server to connect to.

Optional values for $params:

lsformat - (string) The return formatting from the 'ls' command).
                      Values: 'aix', 'standard' (default)
maplocalids - (boolean) If true and the POSIX extension is available, the
              driver will map the user and group IDs returned from the FTP
              server with the local IDs from the local password file.  This
              is useful only if the FTP server is running on localhost or
              if the local user/group IDs are identical to the remote FTP
              server.
pasv - (boolean) If true, connection will be set to passive mode.
port - (integer) The port used to connect to the ftp server if other than
       21 (FTP default).
ssl - (boolean) If true, and PHP had been compiled with OpenSSL support,
       TLS transport-level encryption will be negotiated with the server.
timeout -(integer) The timeout for the server.
type - (string) The type of the remote FTP server.
       Possible values: 'unix', 'win', 'netware'
       By default, we attempt to auto-detect type.

Copyright 2002-2012 Horde LLC (http://www.horde.org/) Copyright 2002-2007 Michael Varghese mike.varghese@ascellatech.com

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_Ftp
Package: Vfs
Author: Chuck Hagenbuch chuck@horde.org
Author: Michael Varghese mike.varghese@ascellatech.com
Located at Horde/Vfs/Ftp.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 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
Automatically create directories?

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
Automatically create directories?

Throws

Horde_Vfs_Exception

Overrides

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

Returns the current working directory on the FTP server.

Returns the current working directory on the FTP 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(), exists(), getFolderSize(), getModifiablePermissions(), getParam(), getQuota(), getRequiredCredentials(), getVFSSize(), listFolder(), readByteRange(), setParams(), setQuota(), setQuotaRoot()
API documentation generated by ApiGen