Class Horde_Vfs_Object
A wrapper for the VFS class to return objects, instead of arrays.
Copyright 2002-2007 Jon Wood jon@jellybob.co.uk
See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.horde.org/licenses/lgpl21.
Methods summary
public
|
#
__construct( VFS $vfs )
Constructor.
If you pass in an existing VFS object, it will be used as the VFS
object for this object.
Parameters
- $vfs
- The VFS object to wrap.
|
public
|
#
checkCredentials( )
Check the credentials that we have to see if there is a valid login.
Check the credentials that we have to see if there is a valid login.
Throws
Horde_Vfs_Exception;
|
public
|
#
setParams( array $params = array() )
Set configuration parameters.
Set configuration parameters.
Parameters
- $params
- <p>An associative array of parameter name/value
pairs.</p>
|
public
string
|
#
read( string $path )
Retrieve a file from the VFS.
Retrieve a file from the VFS.
Parameters
- $path
- The pathname to the file.
Returns
string The file data.
Throws
|
public
|
#
write( string $path, string $tmpFile, boolean $autocreate = false )
Store a file in the VFS.
Parameters
- $path
- The path to store the file in.
- $tmpFile
- <p>The temporary file containing the data to be
stored.</p>
- $autocreate
- Automatically create directories?
Throws
|
public
|
#
writeData( string $path, string $data, boolean $autocreate = false )
Store a file in the VFS from raw data.
Store a file in the VFS from raw data.
Parameters
- $path
- The path to store the file in.
- $data
- The file data.
- $autocreate
- Automatically create directories?
Throws
|
public
|
#
deleteFile( string $path )
Delete a file from the VFS.
Delete a file from the VFS.
Parameters
- $path
- The path to store the file in.
Throws
|
public
|
#
rename( string $oldpath, string $newpath )
Rename a file in the VFS.
Rename a file in the VFS.
Parameters
- $oldpath
- The old path to the file.
- $newpath
- $oldname The old filename.
Throws
|
public
|
#
createFolder( string $path )
Create a folder in the VFS.
Create a folder in the VFS.
Parameters
- $path
- The path to the folder.
Throws
|
public
|
#
deleteFolder( string $path )
Deletes a folder from the VFS.
Deletes a folder from the VFS.
Parameters
- $path
- The path of the folder to delete.
Throws
|
public
mixed
|
#
listFolder( string $path )
Returns a Horde_Vfs_ListItem object if the folder can
be read, or a PEAR_Error if it can't be. Returns false once
the folder has been completely read.
Returns a Horde_Vfs_ListItem object if the folder can
be read, or a PEAR_Error if it can't be. Returns false once
the folder has been completely read.
Parameters
- $path
- The path of the diretory.
Returns
mixed File list (array) on success or false if the folder is
completely read.
Throws
|
public
|
#
changePermissions( string $path, string $permission )
Changes permissions for an Item on the VFS.
Changes permissions for an Item on the VFS.
Parameters
- $path
- Holds the path of directory of the Item.
- $permission
- TODO
Throws
|
public
array
|
#
getRequiredCredentials( )
Return the list of additional credentials required, if any.
Return the list of additional credentials required, if any.
Returns
array Credential list.
|
public
array
|
#
getModifiablePermissions( )
Return the array specificying what permissions are changeable for this
implementation.
Return the array specificying what permissions are changeable for this
implementation.
Returns
array Changeable permisions.
|