FileSystemMapper
in package
FinalYes
Mezivrstva mezi FileSystemService a {@see FileSystemRepository} (FS operace nad uploads).
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
$repository read-only
private
FileSystemRepository
$repository
Methods
__construct()
public
__construct(FileSystemRepository $repository) : mixed
Parameters
- $repository : FileSystemRepository
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