44 $finder = $this->storage->finder()
50 foreach ($finder as $file) {
51 $basename = basename($file->getPath());
53 $files[base64_encode($file->getPath())] = $basename;
56 if ($this->storage->hasDir($this->getRelativePath() .
'/' . (
string) $user_id)) {
57 $finder = $this->storage->finder()->in([$this->
getRelativePath() .
'/' . (
string) $user_id])
61 foreach ($finder as $file) {
62 $basename = basename($file->getPath());
64 $files[base64_encode($file->getPath())] = $basename;
80 $result = preg_match(
'/[0-9]{10}__[0-9]{1,6}__([a-z]{1,4})_[0-9]{2,9}.zip/',
$filename, $matches);
84 if (isset($matches[1]) && $matches[1] ==
$type) {
99 if (strcmp($hash, $post_hash) === 0) {
100 $file_path = base64_decode($hash);
An exception for terminatinating execution or to throw for unit testing.
Import directory interface.
getAbsolutePathForHash(int $user_id, string $type, string $post_hash)
matchesType(string $type, string $filename)
Check if filename matches a given type.
hasFilesFor(int $user_id, string $type)
getFilesFor(int $user_id, string $type)
static getDataDir()
get data directory (outside webspace)
Interface Filesystem The filesystem interface provides the public interface for the Filesystem servic...