The adapter provide direct access to the native filesystem.
Methods
Write contents to a file. Returns <em>false</em> on error (e.a. if file is a directory).
appendContents(\Filicious\Internals\Pathname $pathname, string $content, bool $create) : static
Parameters
$content
string
$create
bool
Exceptions
Returns
static
Copies file
copyFrom(\Filicious\Internals\Pathname $dstPathname, \Filicious\Internals\Pathname $srcPathname, int $flags) : static
TODO list valid flags
Parameters
$flags
intFlags to control the operations behavior
Exceptions
Returns
static
Copies file
copyTo(\Filicious\Internals\Pathname $srcPathname, \Filicious\Internals\Pathname $dstPathname, int $flags) : static
TODO list valid flags
Parameters
$flags
intFlags to control the operations behavior
Exceptions
Returns
static
TODO
count(\Filicious\Internals\Pathname $pathname, array $filter) : int
Parameters
$filter
arrayAn array of filters to apply
Exceptions
Returns
intThe amount of child nodes of the pathname
Makes directory
createDirectory(\Filicious\Internals\Pathname $pathname, bool $parents) : static
Parameters
$parents
bool
Exceptions
Returns
static
Create new empty file.
createFile(\Filicious\Internals\Pathname $pathname, bool $parents) : static
Parameters
$parents
bool
Exceptions
Returns
static
Delete a file or directory.
delete(\Filicious\Internals\Pathname $pathname, bool $recursive, bool $force) : static
Parameters
$recursive
bool
$force
bool
Exceptions
Returns
static
Checks whether a file or directory exists.
exists(\Filicious\Internals\Pathname $pathname) : bool
Parameters
Exceptions
Returns
bool
Returns the time of the file named by the given pathname was accessed
last time.
getAccessTime(\Filicious\Internals\Pathname $pathname) : \DateTime
Parameters
Exceptions
Returns
Get contents of the file. Returns <em>null</em> if file does not exists
and <em>false</em> on error (e.a. if file is a directory).
getContents(\Filicious\Internals\Pathname $pathname) : string
Parameters
Exceptions
Returns
string
Returns the time of the file named by the given pathname at which it was
created.
getCreationTime(\Filicious\Internals\Pathname $pathname) : \DateTime
Parameters
Exceptions
Returns
Get the group of the file named by the given pathname.
getGroup(\Filicious\Internals\Pathname $pathname) : string | int
Parameters
Exceptions
Returns
stringint
TODO
getIterator(\Filicious\Internals\Pathname $pathname, array $filter) : \Iterator
Parameters
$filter
arrayAn array of filters to apply
Exceptions
Returns
\IteratorAn iterator which iterates over the matched child nodes
Get the mode of the file named by the given pathname.
getMode(\Filicious\Internals\Pathname $pathname) : int
Parameters
Exceptions
Returns
intTODO mode representation type?
Returns the time of the file named by the given pathname was modified
last time.
getModifyTime(\Filicious\Internals\Pathname $pathname) : \DateTime
Parameters
Exceptions
Returns
Get the owner of the file named by the given pathname.
getOwner(\Filicious\Internals\Pathname $pathname) : string | int
Parameters
Exceptions
Returns
stringint
Get the size of the file named by the given pathname.
getSize(\Filicious\Internals\Pathname $pathname, bool $recursive) : int
Parameters
$recursive
boolWhether or not to calculate the size of
directories.
Exceptions
Returns
intThe size of the file
Gets an stream for the file. May return <em>null</em> if streaming is not supported.
getStream(\Filicious\Internals\Pathname $pathname) : \Filicious\Stream
Parameters
Exceptions
Returns
Get the real url, e.g. file:/real/path/to/file to the pathname.
getStreamURL(\Filicious\Internals\Pathname $pathname) : string
Parameters
Exceptions
Returns
string
Tests whether the file denoted by the given pathname exists and is a
directory.
isDirectory(\Filicious\Internals\Pathname $pathname) : bool
Parameters
Exceptions
Returns
boolTrue, if the file exists and is a directory; otherwise false
Tests whether the file named by the given pathname is executeable.
isExecutable(\Filicious\Internals\Pathname $pathname) : bool
Parameters
Exceptions
Returns
boolTrue, if the file exists and is executable; otherwise false
Tests whether the file denoted by the given pathname exists and is a
file.
isFile(\Filicious\Internals\Pathname $pathname) : bool
Parameters
Exceptions
Returns
boolTrue, if the file exists and is a file; otherwise false
Tests whether the file denoted by the given pathname exists and is a
link.
isLink(\Filicious\Internals\Pathname $pathname) : bool
Parameters
Exceptions
Returns
boolTrue, if the file exists and is a link; otherwise false
Tests whether the file named by the given pathname is readable.
isReadable(\Filicious\Internals\Pathname $pathname) : bool
Parameters
Exceptions
Returns
boolTrue, if the file exists and is readable; otherwise false
Tests whether the file named by the given pathname is writable.
isWritable(\Filicious\Internals\Pathname $pathname) : bool
Parameters
Exceptions
Returns
boolTrue, if the file exists and is writable; otherwise false
Returns all filenames of all (direct) children.
ls(\Filicious\Internals\Pathname $pathname) : \Filicious\File[]
Parameters
Exceptions
Returns
Renames a file or directory
moveFrom(\Filicious\Internals\Pathname $dstPathname, \Filicious\Internals\Pathname $srcPathname, int $flags) : static
TODO list valid flags
Parameters
$flags
intFlags to control the operations behavior
Exceptions
Returns
static
Renames a file or directory
moveTo(\Filicious\Internals\Pathname $srcPathname, \Filicious\Internals\Pathname $dstPathname, int $flags) : static
TODO list valid flags
Parameters
$flags
intFlags to control the operations behavior
Exceptions
Returns
static
Resolve the local path
resolveLocal(\Filicious\Internals\Pathname $pathname, \Filicious\Internals\Adapter $localAdapter, string $local) : static
Parameters
$local
stringThe adapter local path
Returns
static
Sets the access time of the file named by the given pathname.
setAccessTime(\Filicious\Internals\Pathname $pathname, \DateTime $accessTime) : static
Parameters
Exceptions
Returns
static
Write contents to a file. Returns <em>false</em> on error (e.a. if file is a directory).
setContents(\Filicious\Internals\Pathname $pathname, string $content, bool $create) : static
Parameters
$content
string
$create
bool
Exceptions
Returns
static
Set the filesystem this adapter belongs to.
setFilesystem(\Filicious\Filesystem $fs) : static
Parameters
Returns
static
Change the group of the file named by the given pathname.
setGroup(\Filicious\Internals\Pathname $pathname, mixed $group) : static
Parameters
$group
mixed
Exceptions
Returns
static
Set the mode of the file named by the given pathname.
setMode(\Filicious\Internals\Pathname $pathname, int $mode) : static
Parameters
$mode
intTODO mode representation type?
Exceptions
Returns
static
Sets the modify time of the file named by the given pathname.
setModifyTime(\Filicious\Internals\Pathname $pathname, \DateTime $modifyTime) : static
Parameters
$modifyTime
\DateTimeThe new modify time to set
Exceptions
Returns
static
Set the owner of the file named by the given pathname.
setOwner(\Filicious\Internals\Pathname $pathname, string|int $user) : static
Parameters
$user
stringint
Exceptions
Returns
static
Set the parent adapter for this adapter.
setParentAdapter(\Filicious\Internals\Adapter|null $parent) : static
Parameters
Returns
static
Sets access and modify time of file, optionally creating the file, if it
does not exists yet.
touch(\Filicious\Internals\Pathname $pathname, \DateTime $modifyTime, \DateTime $accessTime, bool $create) : static
Parameters
$modifyTime
\DateTimeThe new modify time to set
$accessTime
\DateTimeThe new access time to set; If null then $modifyTime will be used
$create
boolWhether to create the file, if it does not already exists
Exceptions
Returns
static
Truncate a file to a given length. Returns the new length or
<em>false</em> on error (e.a. if file is a directory).
truncate(\Filicious\Internals\Pathname $pathname, int $size) : static
Parameters
$size
int
Exceptions
Returns
static