DirectoryViaPlaceholderFileAdapter
extends IndirectAdapter
in package
implements
FilesystemAdapter
Read onlyYes
FinalYes
Implements directory support for any adapter utilizing a placeholder file.
On iteration of directory contents the placeholder file is skipped, it is assumed any adapter not supporting directories will still correctly emit a directory node for any path prefix that contains a file.
Table of Contents
Interfaces
- FilesystemAdapter
Properties
- $base : FilesystemAdapter
- $placeHolderName : string
Methods
- __construct() : mixed
- copy() : void
- createDirectory() : void
- delete() : void
- deleteDirectory() : void
- directoryExists() : bool
- fileExists() : bool
- fileSize() : FileAttributes
- lastModified() : FileAttributes
- listContents() : iterable<string|int, mixed>
- Iteration will usually support directories even on adapters that don't have that concept.
- mimeType() : FileAttributes
- move() : void
- publicUrl() : string
- read() : string
- readStream() : resource
- setVisibility() : void
- visibility() : FileAttributes
- write() : void
- writeStream() : void
- getAdapter() : FilesystemAdapter
- preparePath() : string
Properties
$base read-only
private
FilesystemAdapter
$base
$placeHolderName read-only
private
string
$placeHolderName
= '.directory'
Methods
__construct()
public
__construct(FilesystemAdapter $base[, string $placeHolderName = '.directory' ]) : mixed
Parameters
- $base : FilesystemAdapter
- $placeHolderName : string = '.directory'
copy()
public
copy(string $source, string $destination, Config $config) : void
Parameters
- $source : string
- $destination : string
- $config : Config
createDirectory()
public
createDirectory(string $path, Config $config) : void
Parameters
- $path : string
- $config : Config
delete()
public
delete(string $path) : void
Parameters
- $path : string
deleteDirectory()
public
deleteDirectory(string $path) : void
Parameters
- $path : string
directoryExists()
public
directoryExists(string $path) : bool
Parameters
- $path : string
Return values
boolfileExists()
public
fileExists(string $path) : bool
Parameters
- $path : string
Return values
boolfileSize()
public
fileSize(string $path) : FileAttributes
Parameters
- $path : string
Return values
FileAttributeslastModified()
public
lastModified(string $path) : FileAttributes
Parameters
- $path : string
Return values
FileAttributeslistContents()
Iteration will usually support directories even on adapters that don't have that concept.
public
listContents(string $path, bool $deep) : iterable<string|int, mixed>
They'll show a prefix for a filename as a directory automatically.
Parameters
- $path : string
- $deep : bool
Return values
iterable<string|int, mixed>mimeType()
public
mimeType(string $path) : FileAttributes
Parameters
- $path : string
Return values
FileAttributesmove()
public
move(string $source, string $destination, Config $config) : void
Parameters
- $source : string
- $destination : string
- $config : Config
publicUrl()
public
publicUrl(string $path, Config $config) : string
Parameters
- $path : string
- $config : Config
Return values
stringread()
public
read(string $path) : string
Parameters
- $path : string
Return values
stringreadStream()
public
readStream(string $path) : resource
Parameters
- $path : string
Return values
resourcesetVisibility()
public
setVisibility(string $path, string $visibility) : void
Parameters
- $path : string
- $visibility : string
visibility()
public
visibility(string $path) : FileAttributes
Parameters
- $path : string
Return values
FileAttributeswrite()
public
write(string $path, string $contents, Config $config) : void
Parameters
- $path : string
- $contents : string
- $config : Config
writeStream()
public
writeStream(string $path, resource $contents, Config $config) : void
Parameters
- $path : string
- $contents : resource
- $config : Config
getAdapter()
protected
getAdapter(string $rawPath, string $preparedPath) : FilesystemAdapter
Parameters
- $rawPath : string
- $preparedPath : string
Return values
FilesystemAdapterpreparePath()
protected
preparePath(string $path) : string
Parameters
- $path : string