Returns files bag
For internal usage only

@return \Krystal\Http\FileTransfer\Input
324225
private function getFilesbag()
    {
        static $filesBag = null;

        if (is_null($filesBag)) {
            $filesBag = new FileInput($this->files);
        }

        return $filesBag;
    }
329495
public function provideFilesToCheck()
    {
        $iterator = new AppendIterator();

        foreach ($this->getPaths() as $path) {
            $iterator->append(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)));
        }

        $files = new CallbackFilterIterator($iterator, function ($file) {
            return $file->getFilename()[0] !== '.' && !$file->isDir();
        });

        return array_map(function ($file) {
            return [(string) $file];
        }, iterator_to_array($files));
    }
220373
protected function getInputFileWithoutExt()
    {
        $info = pathinfo($this->getView()->getInputFile());

        return $info['dirname']
            . DIRECTORY_SEPARATOR
            . ($info['filename']?:$info['basename']); // allow dot files
    }
912112
public function getFileManager()
    {
        if ($this->fileManager === null) {
            if ($this->config()->file_manager_enabled_by_default) {
                return true;
            } else {
                return false;
            }
        }
        return $this->fileManager;
    }
355618
public function getFilesArray()
    {
        if ($this->_filesArray === null) {
            $this->_filesArray = $this->getQueryCacheHelper((new Query())->from('{{%admin_storage_file}}')->select(['id', 'is_hidden', 'is_deleted', 'folder_id', 'name_original', 'name_new', 'name_new_compound', 'mime_type', 'extension', 'hash_name', 'hash_file', 'upload_timestamp', 'file_size', 'upload_user_id', 'caption'])->indexBy('id'), self::CACHE_KEY_FILE);
        }

        return $this->_filesArray;
    }
1147502
public function getFiles()
    {
        if (!$this->fileSetFiles) {
            $this->populateFiles();
        }
        $files = array();
        foreach ($this->fileSetFiles as $file) {
            $files[] = ConcreteFile::getByID($file->fID);
        }

        return $files;
    }
817292
public function createFileSet()
    {
        $this->fileset = new ZendGuardFileSet();
        $this->filesets[] = $this->fileset;

        return $this->fileset;
    }
666598
public function getArchive()
    {
        $this->close();

        if ($this->comptype === Archive::COMPRESS_AUTO) {
            $this->comptype = Archive::COMPRESS_NONE;
        }

        if ($this->comptype === Archive::COMPRESS_GZIP) {
            return gzencode($this->memory, $this->complevel);
        }
        if ($this->comptype === Archive::COMPRESS_BZIP) {
            return bzcompress($this->memory);
        }
        return $this->memory;
    }
989353
public function getFileObject() {
        if ($this->getAttrib('data-type') === Garp_File::TYPE_IMAGES) {
            $file = new Garp_Image_File();
        } else {
            $file = new Garp_File();
        }
        return $file;
    }
1363955
protected static function getFiles()
    {
        $files = [];
        //
        foreach (glob(Application::$root.'plugins/*') as  $value) {
            $files[] = $value;
        }
        //
        return $files;
    }
230083
public function getAllFiles()
    {
        $ext       = $this->formatter->getFileExtension();
        $filesystemIterator = new \FilesystemIterator($this->path, \FilesystemIterator::SKIP_DOTS);
        $files = new \RegexIterator($filesystemIterator, "/\\.{$ext}$/");

        return $files;
    }
472304
protected function getFiles()
    {
        if (!$this->files) {
            $files = array();
            if ($this->batch) {
                $files = $this->batch->getSessionVariable('files');
            } else {
                $files = $this->_session->files;
            }
            if (!is_array($files)) {
                $files = array();
            }
            $this->files = $files;
        }
        return $this->files;
    }
1161384
public function fileperms()
	{
		if ($this->use_include_path) {
			return fileperms(stream_resolve_include_path($this->_fhandle));
		} else {
			return fileperms($this->_fhandle);
		}
	}
773427
public function getFiles()
    {
        $files = array();
        while ($this->valid() && $this->isFile()) {
            if (!$this->searchPattern) {
                $files[] = $this->current();
            } elseif(preg_match($this->searchPattern, $this->getFilename())) {
                $files[] = $this->current();
            }
            $this->next();
        }
        return $files;
    }
1374585
public function getFile()
    {
        if (is_null($this->file)) {
            $referencer = $this->getServiceLocator()->get(FileReferenceSerializer::SERVICE_ID);
            $this->file = $referencer->unserialize($this->getFileSerial());
        }
        return $this->file;
    }
136855
public function getSmileyFiles()
    {
        $imgfiles = [];
        $filelist = scandir(ForumEnv::get('WEB_ROOT').'assets/img/smilies');
        $filelist = Container::get('hooks')->fire('model.admin.parser.get_smiley_files.filelist', $filelist);
        foreach ($filelist as $file) {
            if (preg_match('/\.(?:png|gif|jpe?g)$/', $file)) {
                $imgfiles[] = $file;
            }
        }
        $imgfiles = Container::get('hooks')->fire('model.admin.parser.get_smiley_files.imgfiles', $imgfiles);
        return $imgfiles;
    }
413783
public function getFile(): ?Filesystem
    {
        if (!$this->hasFile()) {
            $this->setFile($this->getDefaultFile());
        }
        return $this->file;
    }