Documentation

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

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
bool

createDir()

Create a directory.

public createDir(mixed $dirname, Config $config) : array<string|int, mixed>|false
Parameters
$dirname : mixed

directory name

$config : Config
Tags
inheritdoc
Return values
array<string|int, mixed>|false

delete()

Delete a file.

public delete(mixed $path) : bool
Parameters
$path : mixed
Tags
inheritdoc
Return values
bool

deleteDir()

Delete a directory.

public deleteDir(mixed $dirname) : bool
Parameters
$dirname : mixed
Tags
inheritdoc
Return values
bool

getMetadata()

Get all the meta data of a file or directory.

public getMetadata(mixed $path) : array<string|int, mixed>|false
Parameters
$path : mixed
Tags
inheritdoc
Return values
array<string|int, mixed>|false

getMimetype()

Get the mimetype of a file.

public getMimetype(mixed $path) : array<string|int, mixed>|false
Parameters
$path : mixed
Tags
inheritdoc
Return values
array<string|int, mixed>|false

getPathPrefix()

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
inheritdoc
Return values
array<string|int, mixed>|false

getTimestamp()

Get the last modified time of a file as a timestamp.

public getTimestamp(mixed $path) : array<string|int, mixed>|false
Parameters
$path : mixed
Tags
inheritdoc
Return values
array<string|int, mixed>|false

getVisibility()

Get the visibility of a file.

public getVisibility(mixed $path) : array<string|int, mixed>|false
Parameters
$path : mixed
Tags
inheritdoc
Return values
array<string|int, mixed>|false

has()

Check whether a file is present.

public has(string $path) : bool
Parameters
$path : string
Return values
bool

listContents()

List contents of a directory.

public listContents([mixed $directory = '' ][, mixed $recursive = false ]) : array<string|int, mixed>
Parameters
$directory : mixed = ''
$recursive : mixed = false
Tags
inheritdoc
Return values
array<string|int, mixed>

read()

Read a file.

public read(mixed $path) : array<string|int, mixed>|false
Parameters
$path : mixed
Tags
inheritdoc
Return values
array<string|int, mixed>|false

readStream()

public abstract readStream(string $path) : resource
Parameters
$path : string
Return values
resource

removePathPrefix()

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
inheritdoc
Return values
bool

setPathPrefix()

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
inheritdoc
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
inheritdoc
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
inheritdoc
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
Return values
resource

        
On this page

Search results