18declare(strict_types=1);
38 return (
bool) count($this->
getFilesFor($user_id, $type));
46 $finder = $this->storage->finder()
52 foreach ($finder as $file) {
53 $basename = basename($file->getPath());
54 $files[base64_encode($file->getPath())] = $basename;
56 if ($this->storage->hasDir($this->getRelativePath() .
'/' .
$user_id)) {
57 $finder = $this->storage->finder()->in([$this->
getRelativePath() .
'/' . $user_id])
61 foreach ($finder as $file) {
62 $basename = basename($file->getPath());
63 $files[base64_encode($file->getPath())] = $basename;
72 foreach ($this->
getFilesFor($user_id, $type) as $hash => $file) {
73 if (strcmp($hash, $post_hash) === 0) {
74 $file_path = base64_decode($hash);
getAbsolutePathForHash(int $user_id, string $type, string $post_hash)
hasFilesFor(int $user_id, string $type)
getFilesFor(int $user_id)
static getDataDir()
get data directory (outside webspace)
The filesystem interface provides the public interface for the Filesystem service API consumer.