19declare(strict_types=1);
60 public function hasDir(
string $path): bool
62 return $this->directoryAccess->hasDir($path);
68 public function listContents(
string $path =
'',
bool $recursive =
false): array
70 return $this->directoryAccess->listContents($path, $recursive);
78 $this->directoryAccess->createDir($path, $visibility);
84 public function copyDir(
string $source,
string $destination): void
86 $this->directoryAccess->copyDir($source, $destination);
94 $this->directoryAccess->deleteDir($path);
100 public function read(
string $path): string
102 return $this->fileAccess->read($path);
108 public function has(
string $path): bool
110 return $this->fileAccess->has($path);
118 return $this->fileAccess->getMimeType($path);
126 return $this->fileAccess->getTimestamp($path);
134 return $this->fileAccess->
getSize($path, $unit);
142 return $this->fileAccess->setVisibility($path, $visibility);
150 return $this->fileAccess->getVisibility($path);
158 return $this->fileStreamAccess->readStream($path);
166 $this->fileStreamAccess->writeStream($path, $stream);
174 $this->fileStreamAccess->putStream($path, $stream);
182 $this->fileStreamAccess->updateStream($path, $stream);
188 public function write(
string $path,
string $content): void
190 $this->fileAccess->write($path, $content);
196 public function update(
string $path,
string $new_content): void
198 $this->fileAccess->update($path, $new_content);
204 public function put(
string $path,
string $content): void
206 $this->fileAccess->put($path, $content);
212 public function delete(
string $path):
void
214 $this->fileAccess->delete($path);
222 return $this->fileAccess->readAndDelete($path);
228 public function rename(
string $path,
string $new_path): void
230 $this->fileAccess->rename($path, $new_path);
236 public function copy(
string $path,
string $copy_path): void
238 $this->fileAccess->copy($path, $copy_path);
This class provides the data size with additional information to remove the work to calculate the siz...
getSize()
The calculated data size.
The filesystem facade is used internally to satisfy the Filesystem interface because the implementati...
putStream(string $path, FileStream $stream)
@inheritDoc
setVisibility(string $path, string $visibility)
@inheritDoc
readStream(string $path)
@inheritDoc
read(string $path)
@inheritDoc
getTimestamp(string $path)
@inheritDoc
update(string $path, string $new_content)
@inheritDoc
copy(string $path, string $copy_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
createDir(string $path, string $visibility=Visibility::PUBLIC_ACCESS)
@inheritDoc
getSize(string $path, int $unit)
@inheritDoc
getMimeType(string $path)
@inheritDoc
hasDir(string $path)
@inheritDoc
__construct(private FileStreamAccess $fileStreamAccess, private FileAccess $fileAccess, private DirectoryAccess $directoryAccess)
FilesystemFacade constructor.
deleteDir(string $path)
@inheritDoc
rename(string $path, string $new_path)
@inheritDoc
Port of the Symfony2 bundle to work with the ILIAS FileSystem abstraction.
The filesystem interface provides the public interface for the Filesystem service API consumer.
The base interface for all filesystem streams.
const PUBLIC_ACCESS
Public file visibility.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...