3 declare(strict_types=1);
70 return $this->directoryAccess->hasDir($path);
79 return $this->directoryAccess->listContents(
$path, $recursive);
88 $this->directoryAccess->createDir($path, $visibility);
97 $this->directoryAccess->copyDir($source, $destination);
106 $this->directoryAccess->deleteDir($path);
115 return $this->fileAccess->read($path);
124 return $this->fileAccess->has($path);
133 return $this->fileAccess->getMimeType($path);
142 return $this->fileAccess->getTimestamp($path);
151 return $this->fileAccess->
getSize($path, $fileSizeUnit);
160 return $this->fileAccess->setVisibility($path, $visibility);
169 return $this->fileAccess->getVisibility($path);
178 return $this->fileStreamAccess->readStream($path);
187 $this->fileStreamAccess->writeStream($path, $stream);
196 $this->fileStreamAccess->putStream($path, $stream);
205 $this->fileStreamAccess->updateStream($path, $stream);
214 $this->fileAccess->write($path, $content);
223 $this->fileAccess->update($path, $new_content);
230 public function put(
string $path,
string $content): void
232 $this->fileAccess->put($path, $content);
239 public function delete(
string $path):
void 241 $this->fileAccess->delete(
$path);
250 return $this->fileAccess->readAndDelete($path);
259 $this->fileAccess->rename($path, $new_path);
266 public function copy(
string $path,
string $copy_path): void
268 $this->fileAccess->copy($path, $copy_path);
write(string $path, string $content)
setVisibility(string $path, string $visibility)
rename(string $path, string $new_path)
This class provides the data size with additional information to remove the work to calculate the siz...
copyDir(string $source, string $destination)
createDir(string $path, string $visibility=Visibility::PUBLIC_ACCESS)
Interface DirectoryAccess.
FileStreamAccess $fileStreamAccess
getSize(string $path, int $fileSizeUnit)
listContents(string $path='', bool $recursive=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
readAndDelete(string $path)
put(string $path, string $content)
getSize()
The calculated data size.
getTimestamp(string $path)
copy(string $path, string $copy_path)
getVisibility(string $path)
update(string $path, string $new_content)
__construct(FileStreamAccess $fileStreamAccess, FileAccess $fileAccess, DirectoryAccess $directoryAccess)
FilesystemFacade constructor.
const PUBLIC_ACCESS
Public file visibility.
writeStream(string $path, FileStream $stream)
Interface FileStreamAccess.
DirectoryAccess $directoryAccess
putStream(string $path, FileStream $stream)
Class FlySystemFileAccessTest disabled disabled disabled.
updateStream(string $path, FileStream $stream)
getMimeType(string $path)