PunkAve\FileUploaderBundle\Services\FileManager::getFiles PHP Метод

getFiles() публичный Метод

If you pass consistent options to this method and handleFileUpload with regard to paths, then you will get consistent results.
public getFiles ( $options = [] )
    public function getFiles($options = array())
    {
        $options = array_merge($this->options, $options);
        $folder = $options['file_base_path'] . '/' . $options['folder'];
        if (file_exists($folder)) {
            $dirs = glob("{$folder}/originals/*");
            $fullPath = isset($options['full_path']) ? $options['full_path'] : false;
            if ($fullPath) {
                return $dirs;
            }
            if (!is_array($dirs)) {
                $dirs = array();
            }
            $result = array_map(function ($s) {
                return preg_replace('|^.+[\\/]|', '', $s);
            }, $dirs);
            return $result;
        } else {
            return array();
        }
    }