driver-legacy/src/main/com/mongodb/gridfs/GridFS.java
public DBCursor getFileList(final DBObject query, final DBObject sort) {
        return filesCollection.find(query).sort(sort);
    }
public DBCursor getFileList(final DBObject query, final DBObject sort) {
        return filesCollection.find(query).sort(sort);
    }
Gets a sorted, filtered list of files stored in this gridfs.

@param query filter to apply
@param sort  sorting to apply
@return cursor of file objects