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_SqlFile

Horde_Vfs:: implementation using PHP's PEAR database abstraction layer and local file system for file storage.

Required values for $params:

db - (DB) The DB object.
vfsroot - (string) The root directory of where the files should be
          actually stored.

Optional values:

table - (string) The name of the vfs table in 'database'. Defaults to
        'horde_vfs'.

The table structure for the VFS can be found in data/vfs.sql.

Horde_Vfs_Base
Extended by Horde_Vfs_File
Extended by Horde_Vfs_SqlFile
Package: Vfs
Category: Horde
Author: Michael Varghese mike.varghese@ascellatech.com
Located at Horde/Vfs/SqlFile.php
Methods summary
public
# __construct( array $params = array() )

Constructor.

Constructor.

Parameters

$params
A hash containing connection parameters.

Overrides

Horde_Vfs_File::__construct()
public
# write( string $path, string $name, string $tmpFile, boolean $autocreate = false )

Store a file in the VFS, with the data copied from a temporary file.

Store a file in the VFS, with the data copied from a temporary file.

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_File::write()
public
# writeData( string $path, string $name, 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.
$name
The filename to use.
$data
The file data.
$autocreate
Automatically create directories?

Throws

Horde_Vfs_Exception

Overrides

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

Moves a file in the database and the file system.

Moves a file in the database and the file system.

Parameters

$path
The path to store the file in.
$name
The old filename.
$dest
The new filename.
$autocreate
Automatically create directories?

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_File::move()
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 to store the file in.
$name
The filename to use.
$dest
The destination of the file.
$autocreate
Automatically create directories?

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_File::copy()
public
# createFolder( string $path, string $name )

Creates a folder on the VFS.

Creates a folder on the VFS.

Parameters

$path
Holds the path of directory to create folder.
$name
Holds the name of the new folder.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_File::createFolder()
public
# rename( string $oldpath, string $oldname, string $newpath, string $newname )

Rename a file or folder in the VFS.

Rename a file or folder 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_File::rename()
public
# deleteFolder( string $path, string $name, boolean $recursive = false )

Delete a folder from the VFS.

Delete a folder from the VFS.

Parameters

$path
The path to delete the folder from.
$name
The foldername to use.
$recursive
Force a recursive delete?

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_File::deleteFolder()
public
# deleteFile( string $path, string $name )

Delete a file from the VFS.

Delete a file from the VFS.

Parameters

$path
The path to store the file in.
$name
The filename to use.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_File::deleteFile()
public array
# listFolders( string $path = '', mixed $filter = array(), boolean $dotfolders = true )

Returns a sorted list of folders in specified directory.

Returns a sorted list of folders in specified directory.

Parameters

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

Returns

array
Folder list.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_File::listFolders()
Methods inherited from Horde_Vfs_File
changePermissions(), exists(), isFolder(), read(), readByteRange(), readFile(), readStream(), size()
Methods inherited from Horde_Vfs_Base
autocreatePath(), checkCredentials(), delete(), emptyFolder(), getCurrentDirectory(), getFolderSize(), getModifiablePermissions(), getParam(), getQuota(), getRequiredCredentials(), getVFSSize(), listFolder(), setParams(), setQuota(), setQuotaRoot()
Constants summary
integer FILE
# 1
integer FOLDER
# 2
API documentation generated by ApiGen