Documentation

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

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
throws
MiddagInfrastructureException

when the uploads directory cannot be resolved

exists()

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

read()

public read(string $path) : string
Parameters
$path : string
Return values
string

write()

public write(string $path, string $contents) : void
Parameters
$path : string
$contents : string
On this page

Search results