2 declare(strict_types=1);
65 return $this->directoryAccess->hasDir($path);
74 return $this->directoryAccess->listContents(
$path, $recursive);
83 $this->directoryAccess->createDir($path, $visibility);
92 $this->directoryAccess->copyDir($source, $destination);
101 $this->directoryAccess->deleteDir($path);
110 return $this->fileAccess->read($path);
119 return $this->fileAccess->has($path);
128 return $this->fileAccess->getMimeType($path);
137 return $this->fileAccess->getTimestamp($path);
146 return $this->fileAccess->
getSize($path, $fileSizeUnit);
155 return $this->fileAccess->setVisibility($path, $visibility);
164 return $this->fileAccess->getVisibility($path);
173 return $this->fileStreamAccess->readStream($path);
182 $this->fileStreamAccess->writeStream($path, $stream);
191 $this->fileStreamAccess->putStream($path, $stream);
200 $this->fileStreamAccess->updateStream($path, $stream);
209 $this->fileAccess->write($path, $content);
218 $this->fileAccess->update($path, $newContent);
227 $this->fileAccess->put($path, $content);
234 public function delete(
string $path)
236 $this->fileAccess->delete(
$path);
245 return $this->fileAccess->readAndDelete($path);
254 $this->fileAccess->rename($path, $newPath);
263 $this->fileAccess->copy($path, $copyPath);
write(string $path, string $content)
setVisibility(string $path, string $visibility)
Exercise XML Parser which completes/updates a given file by an xml string.
rename(string $path, string $newPath)
$stream
PHP stream implementation.
copy(string $path, string $copyPath)
copyDir(string $source, string $destination)
createDir(string $path, string $visibility=Visibility::PUBLIC_ACCESS)
Interface DirectoryAccess.
getSize(string $path, int $fileSizeUnit)
listContents(string $path='', bool $recursive=false)
readAndDelete(string $path)
put(string $path, string $content)
getSize()
The calculated data size.
getTimestamp(string $path)
update(string $path, string $newContent)
getVisibility(string $path)
__construct(FileStreamAccess $fileStreamAccess, FileAccess $fileAccess, DirectoryAccess $directoryAccess)
FilesystemFacade constructor.
const PUBLIC_ACCESS
Public file visibility.
writeStream(string $path, FileStream $stream)
Interface FileStreamAccess.
putStream(string $path, FileStream $stream)
Class FlySystemFileAccessTest.
updateStream(string $path, FileStream $stream)
getMimeType(string $path)