\Luxor_Files_plain

Luxor repository implementation for a simple filesystem hierarchy.

$Horde: luxor/lib/Files/plain.php,v 1.18 2006/05/23 02:27:39 selsky Exp $

Summary

Methods
Properties
Constants
factory()
Luxor_Files_plain()
getFiletime()
getFilesize()
getFileHandle()
tmpFile()
getDir()
toReal()
isDir()
isFile()
getIndex()
getAnnotations()
$_params
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$_params

$_params : array

Hash containing parameters.

Type

array

Methods

factory()

factory(string  $driver, array  $params = array()) : mixed

Attempts to return a concrete Luxor_Files instance based on $driver.

Parameters

string $driver

The type of concrete Luxor_Files subclass to return. The is based on the repository driver ($driver). The code is dynamically included.

array $params

(optional) A hash containing any additional configuration or connection parameters a subclass might need.

Returns

mixed —

The newly created concrete Luxor_Files instance, or false on an error.

Luxor_Files_plain()

Luxor_Files_plain(array  $params = array()) 

Constructs a new filesystem handler.

Parameters

array $params

A hash containing parameters.

getFiletime()

getFiletime(  $filename) 

Parameters

$filename

getFilesize()

getFilesize(  $filename) 

Parameters

$filename

getFileHandle()

getFileHandle(string  $filename) : \ressource

Returns a file handler.

Parameters

string $filename

The name of the file to open.

Returns

\ressource —

A handler of the file or false on error.

tmpFile()

tmpFile(string  $filename) : string

Creates a temporary copy of a file.

Parameters

string $filename

The name of the file to be copied.

Returns

string —

The file name of the temporary copy or false if the file couldn't be copied.

getDir()

getDir(string  $path,   $release = '') : array

Returns a directory's content. Backup files are skipped and directories suffixed with a slash.

Parameters

string $path

The directory to list.

$release

Returns

array —

An array containing all directories and files of the directory or PEAR_Error if the directory couldn't be read.

toReal()

toReal(string  $pathname) : string

Returns the full path to a file.

Parameters

string $pathname

The internally used (relative) name of the file.

Returns

string —

The full path to the file.

isDir()

isDir(string  $pathname) : boolean

Checks if the given path name is a directory.

Parameters

string $pathname

The path name to check.

Returns

boolean —

True if the path name was a directory.

isFile()

isFile(string  $pathname) : boolean

Checks if the given path name is a file.

Parameters

string $pathname

The path name to check.

Returns

boolean —

True if the path name was a file.

getIndex()

getIndex(  $pathname) 

Parameters

$pathname

getAnnotations()

getAnnotations(  $pathname) 

Parameters

$pathname