PHP Class Horde_Vfs_Musql, horde

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-2016 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.
Author: Chuck Hagenbuch ([email protected])
Author: Mike Cochrane ([email protected])
Inheritance: extends Horde_Vfs_Sql
Mostra file Open project: horde/horde

Protected Properties

Property Type Description
$_permissions array List of permissions and if they can be changed in this VFS

Public Methods

Method Description
changePermissions ( string $path, string $name, string $permission ) Changes permissions for an Item on the VFS.
createFolder ( string $path, string $name ) Creates a folder on the VFS.
deleteFile ( string $path, string $name ) Deletes a file from the VFS.
deleteFolder ( string $path, string $name, boolean $recursive = false ) Deletes a folder from the VFS.
rename ( string $oldpath, string $oldname, string $newpath, string $newname ) Renames a file or folder in the VFS.
writeData ( string $path, string $name, string $data, boolean $autocreate = false ) Stores a file in the VFS from raw data.

Protected Methods

Method Description
_listFolder ( string $path, mixed $filter = null, boolean $dotfiles = true, boolean $dironly = false ) : array Returns an an unsorted file list of the specified directory.

Method Details

_listFolder() protected method

Returns an an unsorted file list of the specified directory.
protected _listFolder ( string $path, mixed $filter = null, boolean $dotfiles = true, boolean $dironly = false ) : array
$path string The path of the directory.
$filter mixed String/hash to filter file/dirname on.
$dotfiles boolean Show dotfiles?
$dironly boolean Show only directories?
return array File list.

changePermissions() public method

Changes permissions for an Item on the VFS.
public changePermissions ( string $path, string $name, string $permission )
$path string The path of directory of the item.
$name string The name of the item.
$permission string The permission to set in octal notation.

createFolder() public method

Creates a folder on the VFS.
public createFolder ( string $path, string $name )
$path string Holds the path of directory to create folder.
$name string Holds the name of the new folder.

deleteFile() public method

Deletes a file from the VFS.
public deleteFile ( string $path, string $name )
$path string The path to store the file in.
$name string The filename to use.

deleteFolder() public method

Deletes a folder from the VFS.
public deleteFolder ( string $path, string $name, boolean $recursive = false )
$path string The path to delete the folder from.
$name string The foldername to use.
$recursive boolean Force a recursive delete?

rename() public method

Renames a file or folder in the VFS.
public rename ( string $oldpath, string $oldname, string $newpath, string $newname )
$oldpath string The old path to the file.
$oldname string The old filename.
$newpath string The new path of the file.
$newname string The new filename.

writeData() public method

Stores a file in the VFS from raw data.
public writeData ( string $path, string $name, string $data, boolean $autocreate = false )
$path string The path to store the file in.
$name string The filename to use.
$data string The file data.
$autocreate boolean Automatically create directories?

Property Details

$_permissions protected_oe property

List of permissions and if they can be changed in this VFS
protected array $_permissions
return array