Documentation

FileInterface

FileInterface

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

CLOUDREXX Development Team info@cloudrexx.com

subpackage

lib_filesystem

Table of Contents

Methods

__toString()  : string
Returns the path to this file
append()  : mixed
copy()  : mixed
delete()  : mixed
exists()  : bool
Wrapper for file_exists()
getAbsoluteFilePath()  : mixed
getHandle()  : resource
Returns a file handle for the given file
getRelativeFilePath()  : string
isWithinWebsiteData()  : bool
Returns whether this file is part of website data
makeWritable()  : mixed
move()  : mixed
rename()  : mixed
touch()  : mixed
write()  : mixed

Methods

__toString()

Returns the path to this file

public __toString() : string

If the file is within the website directory a relative path is returned. Otherwise the absolute path is returned to avoid confusion.

Return values
string

Path to this file

exists()

Wrapper for file_exists()

public exists() : bool
Return values
bool

True if the file exists

getHandle()

Returns a file handle for the given file

public getHandle([bool $writable = false ]) : resource

If you want to use this handle for writing you need to ensure proper locking yourself!

Parameters
$writable : bool = false

Set to true if you need to write to the handle

Tags
throws
FileException

If the file handle cannot be opened or granted

Return values
resource

A file handle

isWithinWebsiteData()

Returns whether this file is part of website data

public isWithinWebsiteData() : bool
Return values
bool

True if this is a website data file

move()

public move(mixed $dst[, mixed $force = false ]) : mixed
Parameters
$dst : mixed
$force : mixed = false

rename()

public rename(mixed $dst[, mixed $force = false ]) : mixed
Parameters
$dst : mixed
$force : mixed = false

        
On this page

Search results