src/GuillermoMartinez/Filemanager/Filemanager.php
public function fileInfo($file,$path){
        if($file->isReadable()){
            $item = $this->fileDetails;
            $item["filename"] = $file->getFilename();
            $item["filetype"] = $file->getExtension();
            $item["lastmodified"] = $file->getMTime();
            $item["size"] = $file->getSize();
            if ($this->isImage($file)) {
                $thumb =  $this->firstThumb($file,$path);
                if($thumb){
                    $item['preview'] = $this->config['url'].$this->config['source'].'/'.$this->config['folder_thumb'].$path.$thumb;
                }
            }
            $item['previewfull'] = $this->config['url'].$this->config['source'].$path.$item["filename"];
            return $item;
        }else{
            return ;
        }
    }
public function fileInfo($file,$path){
        if($file->isReadable()){
            $item = $this->fileDetails;
            $item["filename"] = $file->getFilename();
            $item["filetype"] = $file->getExtension();
            $item["lastmodified"] = $file->getMTime();
            $item["size"] = $file->getSize();
            if ($this->isImage($file)) {
                $thumb =  $this->firstThumb($file,$path);
                if($thumb){
                    $item['preview'] = $this->config['url'].$this->config['source'].'/'.$this->config['folder_thumb'].$path.$thumb;
                }
            }
            $item['previewfull'] = $this->config['url'].$this->config['source'].$path.$item["filename"];
            return $item;
        }else{
            return ;
        }
    }
public function fileInfo ( $ file , $ path ) { if ( $ file -> isReadable ( ) ) { $ item = $ this -> fileDetails ; $ item [ "filename" ] = $ file -> getFilename ( ) ; $ item [ "filetype" ] = $ file -> getExtension ( ) ; $ item [ "lastmodified" ] = $ file -> getMTime ( ) ; $ item [ "size" ] = $ file -> getSize ( ) ; if ( $ this -> isImage ( $ file ) ) { $ thumb = $ this -> firstThumb ( $ file , $ path ) ; if ( $ thumb ) { $ item [ 'preview' ] = $ this -> config [ 'url' ] . $ this -> config [ 'source' ] . '/' . $ this -> config [ 'folder_thumb' ] . $ path . $ thumb ; } } $ item [ 'previewfull' ] = $ this -> config [ 'url' ] . $ this -> config [ 'source' ] . $ path . $ item [ "filename" ] ; return $ item ; } else { return ; } }
Todas las propiedades de un archivo o directorio

@param SplFileInfo $file Object of SplFileInfo
@param string $path Ruta de la carpeta o archivo
@return array|null Lista de propiedades o null si no es leible
Todas las propiedades de un archivo o directorio