VFS
[ class tree: VFS ] [ index: VFS ] [ all elements ]

Class: VFS_ftp

Source Location: /VFS-0.0.5/VFS/ftp.php

Class Overview

VFS
   |
   --VFS_ftp

VFS implementation for an FTP server.


Author(s):

Methods


Inherited Variables

Inherited Methods

Class: VFS

VFS::VFS()
Constructor.
VFS::autocreatePath()
Automatically creates any necessary parent directories in the specified $path.
VFS::changePermissions()
Changes permissions for an item on the VFS.
VFS::checkCredentials()
Checks the credentials that we have by calling _connect(), to see if there is a valid login.
VFS::copy()
Copies a file through the backend.
VFS::createFolder()
Creates a folder in the VFS.
VFS::deleteFile()
Deletes a file from the VFS.
VFS::deleteFolder()
Deletes a folder from the VFS.
VFS::emptyFolder()
Removes recursively all files and subfolders from the given folder.
VFS::exists()
Returns if a given file or folder exists in a folder.
VFS::factory()
Attempts to return a concrete VFS instance based on $driver.
VFS::getCurrentDirectory()
Returns the current working directory of the VFS backend.
VFS::getModifiablePermissions()
Returns an array specifying what permissions are changeable for this VFS implementation.
VFS::getParam()
Returns configuration parameters.
VFS::getRequiredCredentials()
Returns the list of additional credentials required, if any.
VFS::isFolder()
Checks if a given item is a folder.
VFS::listFolder()
Returns a file list of the directory passed in.
VFS::listFolders()
Returns a sorted list of folders in the specified directory.
VFS::log()
Logs a message if a PEAR Log object is available, and the message's priority is lower than or equal to the configured log level.
VFS::move()
Moves a file through the backend.
VFS::read()
Retrieves a file from the VFS.
VFS::rename()
Renames a file in the VFS.
VFS::setLogger()
Sets the PEAR Log object used to log informational or error messages.
VFS::setParams()
Sets configuration parameters.
VFS::singleton()
Attempts to return a reference to a concrete VFS instance based on $driver. It will only create a new instance if no VFS instance with the same parameters currently exists.
VFS::strlen()
Returns the character (not byte) length of a string.
VFS::strtolower()
Converts a string to all lowercase characters ignoring the current locale.
VFS::write()
Stores a file in the VFS.
VFS::writeData()
Stores a file in the VFS from raw data.
VFS::_listFolder()
Returns an an unsorted file list of the specified directory.

Class Details

[line 32]
VFS implementation for an FTP server.

 Required values for $params:
      'username'       The username with which to connect to the ftp server.
      'password'       The password with which to connect to the ftp server.
      'hostspec'       The ftp server to connect to.
 Optional values for $params:
      'pasv'           If true, connection will be set to passive mode.
      'port'           The port used to connect to the ftp server if other
                       than 21.
      'ssl'            If true, and PHP had been compiled with OpenSSL
                       support, TLS transport-level encryption will be
                       negotiated with the server.

$Horde: framework/VFS/VFS/ftp.php,v 1.80 2005/02/17 21:59:03 jan Exp $

Copyright 2002-2005 Chuck Hagenbuch <chuck@horde.org> Copyright 2002-2005 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.fsf.org/copyleft/lgpl.html.



[ Top ]


Method Detail

changePermissions   [line 338]

mixed changePermissions( string $path, string $name, string $permission)

Changes permissions for an item on the VFS.
  • Return: True on success or a PEAR_Error object on failure.
  • Abstract:
  • Access: public

Overrides VFS::changePermissions() (Changes permissions for an item on the VFS.)

Parameters:

string   $path   —  The parent folder of the item.
string   $name   —  The name of the item.
string   $permission   —  The permission to set.

[ Top ]

copy   [line 583]

mixed copy( string $path, string $name, string $dest)

Copies a file through the backend.
  • Return: True on success or a PEAR_Error object on failure.
  • Access: public

Overrides VFS::copy() (Copies a file through the backend.)

Parameters:

string   $path   —  The path of the original file.
string   $name   —  The name of the original file.
string   $dest   —  The name of the destination directory.

[ Top ]

createFolder   [line 312]

mixed createFolder( string $path, string $name)

Creates a folder on the VFS.
  • Return: True on success or a PEAR_Error object on failure.
  • Access: public

Overrides VFS::createFolder() (Creates a folder in the VFS.)

Parameters:

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

[ Top ]

deleteFile   [line 171]

mixed deleteFile( string $path, string $name)

Deletes a file from the VFS.
  • Return: True on success or a PEAR_Error object on failure.
  • Access: public

Overrides VFS::deleteFile() (Deletes a file from the VFS.)

Parameters:

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

[ Top ]

deleteFolder   [line 226]

mixed deleteFolder( string $path, string $name, [boolean $recursive = false])

Deletes a folder from the VFS.
  • Return: True on success or a PEAR_Error object on failure.
  • Access: public

Overrides VFS::deleteFolder() (Deletes a folder from the VFS.)

Parameters:

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

[ Top ]

getCurrentDirectory   [line 684]

string getCurrentDirectory( )

Returns the current working directory on the FTP server.
  • Return: The current working directory.
  • Access: public

Overrides VFS::getCurrentDirectory() (Returns the current working directory of the VFS backend.)
[ Top ]

isFolder   [line 195]

boolean isFolder( string $path, string $name)

Checks if a given item is a folder.
  • Return: True if it is a folder, false otherwise.
  • Access: public

Overrides VFS::isFolder() (Checks if a given item is a folder.)

Parameters:

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

[ Top ]

listFolders   [line 539]

mixed listFolders( [string $path = ''], [mixed $filter = null], [boolean $dotfolders = true])

Returns a sorted list of folders in the specified directory.
  • Return: Folder list on success or a PEAR_Error object on failure.
  • Abstract:
  • Access: public

Overrides VFS::listFolders() (Returns a sorted list of folders in the specified directory.)

Parameters:

string   $path   —  The path of the directory to get the directory list for.
mixed   $filter   —  Hash of items to filter based on folderlist.
boolean   $dotfolders   —  Include dotfolders?

[ Top ]

move   [line 656]

mixed move( string $path, string $name, string $dest)

Moves a file through the backend.
  • Return: True on success or a PEAR_Error object on failure.
  • Access: public

Overrides VFS::move() (Moves a file through the backend.)

Parameters:

string   $path   —  The path of the original file.
string   $name   —  The name of the original file.
string   $dest   —  The destination file name.

[ Top ]

read   [line 68]

string read( string $path, string $name)

Retrieves a file from the VFS.
  • Return: The file data.
  • Access: public

Overrides VFS::read() (Retrieves a file from the VFS.)

Parameters:

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

[ Top ]

rename   [line 288]

mixed rename( string $oldpath, string $oldname, string $newpath, string $newname)

Renames a file in the VFS.
  • Return: True on success or a PEAR_Error object on failure.
  • Access: public

Overrides VFS::rename() (Renames a file in the VFS.)

Parameters:

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

[ Top ]

write   [line 113]

mixed write( string $path, string $name, string $tmpFile, [boolean $autocreate = false])

Stores a file in the VFS.
  • Return: True on success or a PEAR_Error object on failure.
  • Access: public

Overrides VFS::write() (Stores a file in the VFS.)

Parameters:

string   $path   —  The path to store the file in.
string   $name   —  The filename to use.
string   $tmpFile   —  The temporary file containing the data to be stored.
boolean   $autocreate   —  Automatically create directories?

[ Top ]

writeData   [line 149]

mixed writeData( string $path, string $name, string $data, [boolean $autocreate = false])

Stores a file in the VFS from raw data.
  • Return: True on success or a PEAR_Error object on failure.
  • Access: public

Overrides VFS::writeData() (Stores a file in the VFS from raw data.)

Parameters:

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

[ Top ]

_listFolder   [line 365]

array _listFolder( [string $path = ''], [mixed $filter = null], [boolean $dotfiles = true], [boolean $dironly = false])

Returns an an unsorted file list of the specified directory.
  • Return: File list on success or PEAR_Error on failure.
  • Abstract:
  • Access: public

Overrides VFS::_listFolder() (Returns an an unsorted file list of the specified directory.)

Parameters:

string   $path   —  The path of the directory.
mixed   $filter   —  String/hash to filter file/dirname on.
boolean   $dotfiles   —  Show dotfiles?
boolean   $dironly   —  Show only directories?

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:31:25 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.