public function getByHash($hash)
    {

        foreach($this->fs as $file){
            if($file->getHash() == $hash){
                return $file;
            }
        }

    }
public function getByHash($hash)
    {

        foreach($this->fs as $file){
            if($file->getHash() == $hash){
                return $file;
            }
        }

    }
public function getByHash ( $ hash ) { foreach ( $ this -> fs as $ file ) { if ( $ file -> getHash ( ) == $ hash ) { return $ file ; } } }
Get a file by its hash

@param string $hash
@return \FileDB\Contracts\Model\File
Get a file by its hash