2 declare(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);
write(string $path, string $content)
setVisibility(string $path, string $visibility)
rename(string $path, string $newPath)
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)