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_Musql

Multi User VFS implementation for Horde's database abstraction layer.

Required values for $params: - db: A Horde_Db_Adapter object.

Optional values: - table: (string) The name of the vfs table in 'database'. Defaults to 'horde_muvfs'.

Known Issues: Delete is not recusive, so files and folders that used to be in a folder that gets deleted live forever in the database, or re-appear when the folder is recreated. Rename has the same issue, so files are lost if a folder is renamed.

The table structure for the VFS can be created with the horde-db-migrate script from the Horde_Db package.

Copyright 2002-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_Sql
Extended by Horde_Vfs_Musql
Package: Vfs
Author: Chuck Hagenbuch chuck@horde.org
Author: Mike Cochrane mike@graftonhall.co.nz
Located at Horde/Vfs/Musql.php
Methods summary
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_Sql::writeData()
public
# deleteFile( string $path, string $name )

Deletes a file from the VFS.

Deletes 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_Sql::deleteFile()
public
# rename( string $oldpath, string $oldname, string $newpath, string $newname )

Renames a file or folder in the VFS.

Renames 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_Sql::rename()
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_Sql::createFolder()
public
# deleteFolder( string $path, string $name, boolean $recursive = false )

Deletes a folder from the VFS.

Deletes 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_Sql::deleteFolder()
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 path of directory 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()
Methods inherited from Horde_Vfs_Sql
__construct(), gc(), getFolderSize(), isFolder(), listFolders(), read(), readByteRange(), size(), write()
Methods inherited from Horde_Vfs_Base
autocreatePath(), checkCredentials(), copy(), delete(), emptyFolder(), exists(), getCurrentDirectory(), getModifiablePermissions(), getParam(), getQuota(), getRequiredCredentials(), getVFSSize(), listFolder(), move(), readFile(), setParams(), setQuota(), setQuotaRoot()
Constants summary
integer FLAG_READ
# 1
integer FLAG_WRITE
# 2
Constants inherited from Horde_Vfs_Sql
FILE, FOLDER
API documentation generated by ApiGen