src/League/Monga/Filesystem.php
public function findOne($query = [], $fields = [])
    {
        if (is_string($query)) {
            return $this->collection->findOne($query, $fields = []);
        }

        return parent::findOne($query, $fields);
    }
public function findOne($query = [], $fields = [])
    {
        if (is_string($query)) {
            return $this->collection->findOne($query, $fields = []);
        }

        return parent::findOne($query, $fields);
    }
public function findOne ( $ query = [ ] , $ fields = [ ] ) { if ( is_string ( $ query ) ) { return $ this -> collection -> findOne ( $ query , $ fields = [ ] ) ; } return parent :: findOne ( $ query , $ fields ) ; }
Finds one file.

@param mixed $query  filename or search query
@param array $fields metadata fields select/exclude statement

@return object|null MongoGridFSFile instance or null when not found.
Finds one file .