Documentation

PrivilegedFileSystemFile extends FileSystemFile
in package

Privileged File System File

This class provides an object based interface to a file that resides on the local file system.

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

Thomas Wirz thomas.wirz@cloudrexx.com

subpackage

lib_filesystem

Table of Contents

Properties

$privileged  : bool
If set to TRUE then access to all files of a Cloudrexx installation is granted. Otherwise, access is only being granted to files located in: - /images - /media - /themes - /tmp/session-<sid>

Methods

__construct()  : mixed
Create a new FileSystemFile object that acts as an interface to a file located on the local file system.
__toString()  : string
Returns the path to this file
append()  : mixed
copy()  : mixed
delete()  : mixed
exists()  : bool
Wrapper for file_exists()
getAbsoluteFilePath()  : string
Get the absolute path of the file ({@see static::$filePath})
getFileOwner()  : mixed
getFilePermissions()  : mixed
getHandle()  : resource
Returns a file handle for the given file
getRelativeFilePath()  : string
Get the relative path of the file
isPrivileged()  : bool
Whether this instance has privileged file system access.
isWithinWebsiteData()  : bool
Returns whether this file is part of website data
isWritable()  : mixed
makeWritable()  : mixed
move()  : mixed
rename()  : mixed
touch()  : mixed
write()  : mixed

Properties

$privileged

If set to TRUE then access to all files of a Cloudrexx installation is granted. Otherwise, access is only being granted to files located in: - /images - /media - /themes - /tmp/session-<sid>

protected bool $privileged = true

Methods

__construct()

Create a new FileSystemFile object that acts as an interface to a file located on the local file system.

public __construct(mixed $file) : mixed
Parameters
$file : mixed

__toString()

Returns the path to this file

public __toString() : string
Tags
inheritDoc
Return values
string

Path to this file

exists()

Wrapper for file_exists()

public exists() : bool
Tags
inheritDoc
Return values
bool

True if the file exists

getAbsoluteFilePath()

Get the absolute path of the file ({@see static::$filePath})

public getAbsoluteFilePath() : string
Return values
string

absolute path of the file

getHandle()

Returns a file handle for the given file

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

Set to true if you need to write to the handle

Tags
inheritDoc
Return values
resource

A file handle

getRelativeFilePath()

Get the relative path of the file

public getRelativeFilePath() : string
Tags
throws
FileSystemFileException

In case static::$filePath is neither located in the website's document root, nor in the codebase's document root.

Return values
string

relative path of the file

isPrivileged()

Whether this instance has privileged file system access.

public isPrivileged() : bool
Return values
bool

isWithinWebsiteData()

Returns whether this file is part of website data

public isWithinWebsiteData() : bool
Tags
inheritDoc
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