Methods

copy()

copy($path, $new_path) 

Parameters

$path

$new_path

copy_dir()

copy_dir($path, $new_path) 

Parameters

$path

$new_path

create()

create($basepath, $name, $contents) 

Parameters

$basepath

$name

$contents

create_dir()

create_dir($basepath, $name, $chmod) 

Parameters

$basepath

$name

$chmod

delete()

delete($path) 

Parameters

$path

delete_dir()

delete_dir($path, $recursive, $delete_top) 

Parameters

$path

$recursive

$delete_top

Are the shown extensions limited, and if so to which?

extensions() : array

Returns

array

Factory for area objects

forge(array $config) : \Fuel\Core\File_Area

Parameters

$config

array

Returns

Handler factory for given path

get_handler(string $path, array $config, array $content) : \Fuel\Core\File_Handler_File

Parameters

$path

string

path to file or directory

$config

array

optional config

$content

array

Exceptions

\FileAccessException when outside basedir restriction or disallowed file extension
\OutsideAreaException

Returns

Translate relative path to real path, throws error when operation is not allowed

get_path(string $path) : string

Parameters

$path

string

Exceptions

\FileAccessException when outside basedir restriction or disallowed file extension
\OutsideAreaException

Returns

string

get_permissions()

get_permissions($path) 

Parameters

$path

get_size()

get_size($path) 

Parameters

$path

get_time()

get_time($path, $type) 

Parameters

$path

$type

Translate relative path to accessible path, throws error when operation is not allowed

get_url($path) : string

Parameters

$path

string

Exceptions

\LogicException when no url is set or no basedir is set and file is outside DOCROOT

Returns

string

read()

read($path, $as_string) 

Parameters

$path

$as_string

read_dir()

read_dir($path, $depth, $filter) 

Parameters

$path

$depth

$filter

rename()

rename($path, $new_path) 

Parameters

$path

$new_path

rename_dir()

rename_dir($path, $new_path) 

Parameters

$path

$new_path

update()

update($basepath, $name, $new_content) 

Parameters

$basepath

$name

$new_content

Does this area use file locks?

use_locks() : bool

Returns

bool

__construct()

__construct(array $config) 

Parameters

$config

 Properties

 

<p>path to basedir restriction, null for no restriction</p>

$basedir : string

 

<p>array of allowed extensions, null for all</p>

$extensions : array

 

<p>contains file handler per file extension</p>

$file_handlers : array

 

<p>base url for files, null for not available</p>

$url : string

 

<p>whether or not to use file locks when doing file operations</p>

$use_locks : bool