2declare(strict_types=1);
64 public function hasDir(
string $path) : bool
66 return $this->directoryAccess->hasDir($path);
73 public function listContents(
string $path =
'',
bool $recursive =
false) : array
75 return $this->directoryAccess->listContents($path, $recursive);
84 $this->directoryAccess->createDir($path, $visibility);
93 $this->directoryAccess->copyDir(
$source, $destination);
102 $this->directoryAccess->deleteDir($path);
109 public function read(
string $path) : string
111 return $this->fileAccess->read($path);
118 public function has(
string $path) : bool
120 return $this->fileAccess->has($path);
129 return $this->fileAccess->getMimeType($path);
138 return $this->fileAccess->getTimestamp($path);
147 return $this->fileAccess->
getSize($path, $fileSizeUnit);
156 return $this->fileAccess->setVisibility($path, $visibility);
165 return $this->fileAccess->getVisibility($path);
174 return $this->fileStreamAccess->readStream($path);
183 $this->fileStreamAccess->writeStream($path, $stream);
192 $this->fileStreamAccess->putStream($path, $stream);
201 $this->fileStreamAccess->updateStream($path, $stream);
208 public function write(
string $path,
string $content)
210 $this->fileAccess->write($path, $content);
217 public function update(
string $path,
string $newContent)
219 $this->fileAccess->update($path, $newContent);
226 public function put(
string $path,
string $content)
228 $this->fileAccess->put($path, $content);
235 public function delete(
string $path)
237 $this->fileAccess->delete($path);
246 return $this->fileAccess->readAndDelete($path);
253 public function rename(
string $path,
string $newPath)
255 $this->fileAccess->rename($path, $newPath);
262 public function copy(
string $path,
string $copyPath)
264 $this->fileAccess->copy($path, $copyPath);
An exception for terminatinating execution or to throw for unit testing.
getSize()
The calculated data size.
putStream(string $path, FileStream $stream)
@inheritDoc
copy(string $path, string $copyPath)
@inheritDoc
setVisibility(string $path, string $visibility)
@inheritDoc
readStream(string $path)
@inheritDoc
read(string $path)
@inheritDoc
getTimestamp(string $path)
@inheritDoc
listContents(string $path='', bool $recursive=false)
@inheritDoc
writeStream(string $path, FileStream $stream)
@inheritDoc
write(string $path, string $content)
@inheritDoc
has(string $path)
@inheritDoc
updateStream(string $path, FileStream $stream)
@inheritDoc
put(string $path, string $content)
@inheritDoc
readAndDelete(string $path)
@inheritDoc
getVisibility(string $path)
@inheritDoc
copyDir(string $source, string $destination)
@inheritDoc
update(string $path, string $newContent)
@inheritDoc
createDir(string $path, string $visibility=Visibility::PUBLIC_ACCESS)
@inheritDoc
__construct(FileStreamAccess $fileStreamAccess, FileAccess $fileAccess, DirectoryAccess $directoryAccess)
FilesystemFacade constructor.
getMimeType(string $path)
@inheritDoc
hasDir(string $path)
@inheritDoc
getSize(string $path, int $fileSizeUnit)
@inheritDoc
rename(string $path, string $newPath)
@inheritDoc
deleteDir(string $path)
@inheritDoc
Interface DirectoryAccess Defines all directory access operations of the filesystem.
Interface FileAccess The FileAccess interface defines all file operations.
Interface FileStreamAccess This interface describes all streaming filesystem operations.
Interface FileStream The base interface for all filesystem streams.
const PUBLIC_ACCESS
Public file visibility.
Class FlySystemFileAccessTest \Provider\FlySystem @runTestsInSeparateProcesses @preserveGlobalState d...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...