19declare(strict_types=1);
39 return (
bool) count($this->
getFilesFor($user_id, $type));
47 $finder = $this->storage->finder()
53 foreach ($finder as $file) {
54 $basename = basename($file->getPath());
55 $files[base64_encode($file->getPath())] = $basename;
57 if ($this->storage->hasDir($this->getRelativePath() .
'/' .
$user_id)) {
58 $finder = $this->storage->finder()->in([$this->
getRelativePath() .
'/' . $user_id])
62 foreach ($finder as $file) {
63 $basename = basename($file->getPath());
64 $files[base64_encode($file->getPath())] = $basename;
73 foreach ($this->
getFilesFor($user_id, $type) as $hash => $file) {
74 if (strcmp($hash, $post_hash) === 0) {
75 $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.