FileSystemManager
in package
FinalYes
Entry point for the uploads file system, used by {@see \App\UI\Api\System\Presenters\FileSystemPresenter}.
Does not touch the DB (unlike FileManager for the File entity); delegates to FileSystemService.
Table of Contents
Properties
Methods
- __construct() : mixed
- createFolder() : Result
- delete() : bool
- listFolder() : FtpFile>}
- read() : array{name: string, content: string, contentType: string}|null
- rename() : bool
- sanitizeAll() : Result
- writeFile() : Result
Properties
$service read-only
private
FileSystemService
$service
Methods
__construct()
public
__construct(FileSystemService $service) : mixed
Parameters
- $service : FileSystemService
createFolder()
public
createFolder(string $relParent, string $name) : Result
Parameters
- $relParent : string
- $name : string
Return values
Resultdelete()
public
delete(string $rel) : bool
Parameters
- $rel : string
Return values
boollistFolder()
public
listFolder(string $rel) : FtpFile>}
Parameters
- $rel : string
Return values
FtpFile>}read()
public
read(string $rel) : array{name: string, content: string, contentType: string}|null
Parameters
- $rel : string
Return values
array{name: string, content: string, contentType: string}|nullrename()
public
rename(string $rel, string $newName) : bool
Parameters
- $rel : string
- $newName : string
Return values
boolsanitizeAll()
public
sanitizeAll() : Result
Return values
Result —data = ['renamed' => int, 'skipped' => int]
writeFile()
public
writeFile(string $relFolder, string $name, string $bytes) : Result
Parameters
- $relFolder : string
- $name : string
- $bytes : string