Methods

Copy file

copy(string $new_path) : bool

Parameters

$new_path

string

path to target directory, must be valid

Returns

bool

Delete file

delete() : bool

Returns

bool

forge()

forge($path, array $config, \Fuel\Core\File_Area $area, $content) 

Parameters

$path

$config

$area

$content

Get the file's path.

get_path() : string

Returns

stringFile path

Get the file's permissions.

get_permissions() : string

Returns

stringfile permissions

Get the file's size.

get_size() : int

Returns

intFile size

Get the file's created or modified timestamp.

get_time(string $type) : int

Parameters

$type

string

modified or created

Returns

intUnix Timestamp

Get the url.

get_url() : bool

Returns

bool

Move file to new directory

move(string $new_path) : bool

Parameters

$new_path

string

path to new directory, must be valid

Returns

bool

Read file

read(bool $as_string) : string | \Fuel\Core\IO

Parameters

$as_string

bool

whether to use file_get_contents() or readfile()

Returns

string\Fuel\Core\IO

Rename file, only within current directory

rename(string $new_name, string | bool $new_extension) : bool

Parameters

$new_name

string

new filename

$new_extension

stringbool

new extension, false to keep current

Returns

bool

Update contents

update(mixed $new_content) : bool

Parameters

$new_content

mixed

new file contents

Returns

bool

__construct()

__construct($path, array $config, \Fuel\Core\File_Area $area, $content) 

Parameters

$path

$config

$area

$content

 Properties

 

$area

$area : \Fuel\Core\File_Area

 

<p>path to the file</p>

$path : string

 

<p>whether the current object is read only</p>

$readonly : bool

 

<p>file resource</p>

$resource : Resource