WpUploadsFilesystem
in package
implements
FilesystemInterface
Read onlyYes
FinalYes
WordPress implementation of the framework filesystem port, rooted at the site's uploads directory (`wp_upload_dir()['basedir']`) — the one location a plugin may write to on every WP host. Delegates to the framework's {@see LocalFilesystem} for the actual path-jailed IO.
Table of Contents
Interfaces
- FilesystemInterface
Properties
- $inner : FilesystemInterface
Methods
- __construct() : mixed
- delete() : void
- exists() : bool
- read() : string
- write() : void
Properties
$inner
private
FilesystemInterface
$inner
Methods
__construct()
public
__construct([string $subdirectory = '' ][, string|null $baseDir = null ]) : mixed
Parameters
- $subdirectory : string = ''
-
optional namespace under uploads (e.g. "acme")
- $baseDir : string|null = null
Tags
delete()
public
delete(string $path) : void
Parameters
- $path : string
exists()
public
exists(string $path) : bool
Parameters
- $path : string
Return values
boolread()
public
read(string $path) : string
Parameters
- $path : string
Return values
stringwrite()
public
write(string $path, string $contents) : void
Parameters
- $path : string
- $contents : string