NullAdapter
extends AbstractAdapter
in package
uses
StreamedTrait, StreamedCopyTrait
Table of Contents
Properties
- $pathPrefix : string|null
- $pathSeparator : string
Methods
- applyPathPrefix() : string
- Prefix a path.
- copy() : bool
- Copy a file.
- createDir() : array<string|int, mixed>|false
- Create a directory.
- delete() : bool
- Delete a file.
- deleteDir() : bool
- Delete a directory.
- getMetadata() : array<string|int, mixed>|false
- Get all the meta data of a file or directory.
- getMimetype() : array<string|int, mixed>|false
- Get the mimetype of a file.
- getPathPrefix() : string|null
- Get the path prefix.
- getSize() : array<string|int, mixed>|false
- Get the size of a file.
- getTimestamp() : array<string|int, mixed>|false
- Get the last modified time of a file as a timestamp.
- getVisibility() : array<string|int, mixed>|false
- Get the visibility of a file.
- has() : bool
- Check whether a file is present.
- listContents() : array<string|int, mixed>
- List contents of a directory.
- read() : array<string|int, mixed>|false
- Read a file.
- readStream() : resource
- removePathPrefix() : string
- Remove a path prefix.
- rename() : bool
- Rename a file.
- setPathPrefix() : void
- Set the path prefix.
- setVisibility() : array<string|int, mixed>|false
- Set the visibility for a file.
- update() : array<string|int, mixed>|false
- Update a file.
- write() : array<string|int, mixed>|false
- Write a new file.
- writeStream() : resource
Properties
$pathPrefix
protected
string|null
$pathPrefix
path prefix
$pathSeparator
protected
string
$pathSeparator
= '/'
Methods
applyPathPrefix()
Prefix a path.
public
applyPathPrefix(string $path) : string
Parameters
- $path : string
Return values
string —prefixed path
copy()
Copy a file.
public
copy(string $path, string $newpath) : bool
Parameters
- $path : string
- $newpath : string
Return values
boolcreateDir()
Create a directory.
public
createDir(mixed $dirname, Config $config) : array<string|int, mixed>|false
Parameters
- $dirname : mixed
-
directory name
- $config : Config
Tags
Return values
array<string|int, mixed>|falsedelete()
Delete a file.
public
delete(mixed $path) : bool
Parameters
- $path : mixed
Tags
Return values
booldeleteDir()
Delete a directory.
public
deleteDir(mixed $dirname) : bool
Parameters
- $dirname : mixed
Tags
Return values
boolgetMetadata()
Get all the meta data of a file or directory.
public
getMetadata(mixed $path) : array<string|int, mixed>|false
Parameters
- $path : mixed
Tags
Return values
array<string|int, mixed>|falsegetMimetype()
Get the mimetype of a file.
public
getMimetype(mixed $path) : array<string|int, mixed>|false
Parameters
- $path : mixed
Tags
Return values
array<string|int, mixed>|falsegetPathPrefix()
Get the path prefix.
public
getPathPrefix() : string|null
Return values
string|null —path prefix or null if pathPrefix is empty
getSize()
Get the size of a file.
public
getSize(mixed $path) : array<string|int, mixed>|false
Parameters
- $path : mixed
Tags
Return values
array<string|int, mixed>|falsegetTimestamp()
Get the last modified time of a file as a timestamp.
public
getTimestamp(mixed $path) : array<string|int, mixed>|false
Parameters
- $path : mixed
Tags
Return values
array<string|int, mixed>|falsegetVisibility()
Get the visibility of a file.
public
getVisibility(mixed $path) : array<string|int, mixed>|false
Parameters
- $path : mixed
Tags
Return values
array<string|int, mixed>|falsehas()
Check whether a file is present.
public
has(string $path) : bool
Parameters
- $path : string
Return values
boollistContents()
List contents of a directory.
public
listContents([mixed $directory = '' ][, mixed $recursive = false ]) : array<string|int, mixed>
Parameters
- $directory : mixed = ''
- $recursive : mixed = false
Tags
Return values
array<string|int, mixed>read()
Read a file.
public
read(mixed $path) : array<string|int, mixed>|false
Parameters
- $path : mixed
Tags
Return values
array<string|int, mixed>|falsereadStream()
public
abstract readStream(string $path) : resource
Parameters
- $path : string
Return values
resourceremovePathPrefix()
Remove a path prefix.
public
removePathPrefix(string $path) : string
Parameters
- $path : string
Return values
string —path without the prefix
rename()
Rename a file.
public
rename(mixed $path, mixed $newpath) : bool
Parameters
- $path : mixed
- $newpath : mixed
Tags
Return values
boolsetPathPrefix()
Set the path prefix.
public
setPathPrefix(string $prefix) : void
Parameters
- $prefix : string
setVisibility()
Set the visibility for a file.
public
setVisibility(mixed $path, mixed $visibility) : array<string|int, mixed>|false
Parameters
- $path : mixed
- $visibility : mixed
Tags
Return values
array<string|int, mixed>|false —file meta data
update()
Update a file.
public
update(mixed $path, mixed $contents, Config $config) : array<string|int, mixed>|false
Parameters
- $path : mixed
- $contents : mixed
- $config : Config
-
Config object
Tags
Return values
array<string|int, mixed>|false —false on failure file meta data on success
write()
Write a new file.
public
write(mixed $path, mixed $contents, Config $config) : array<string|int, mixed>|false
Parameters
- $path : mixed
- $contents : mixed
- $config : Config
-
Config object
Tags
Return values
array<string|int, mixed>|false —false on failure file meta data on success
writeStream()
public
abstract writeStream(string $path, resource $resource, Config $config) : resource
Parameters
- $path : string
- $resource : resource
- $config : Config