FileSystemFile
in package
implements
FileInterface
File System File
This will be merged with File and then removed. Do not use directly! Having two separate classes was necessary to implement transparent file operations via FTP, which is no longer supported.
This class provides an object based interface to a file that resides on the local file system.
Tags
Table of Contents
Interfaces
- FileInterface
- FileInterface
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>
- $filePath : mixed
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
= false
$filePath
private
mixed
$filePath
= null
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
Return values
string —Path to this file
append()
public
append(mixed $data) : mixed
Parameters
- $data : mixed
copy()
public
copy(mixed $dst) : mixed
Parameters
- $dst : mixed
delete()
public
delete() : mixed
exists()
Wrapper for file_exists()
public
exists() : bool
Tags
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
getFileOwner()
public
getFileOwner() : mixed
getFilePermissions()
public
getFilePermissions() : mixed
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
Return values
resource —A file handle
getRelativeFilePath()
Get the relative path of the file
public
getRelativeFilePath() : string
Tags
Return values
string —relative path of the file
isPrivileged()
Whether this instance has privileged file system access.
public
isPrivileged() : bool
Return values
boolisWithinWebsiteData()
Returns whether this file is part of website data
public
isWithinWebsiteData() : bool
Tags
Return values
bool —True if this is a website data file
isWritable()
public
isWritable() : mixed
makeWritable()
public
makeWritable() : mixed
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
touch()
public
touch() : mixed
write()
public
write(mixed $data) : mixed
Parameters
- $data : mixed