

def get_bucket(self, bucketpath, prefix, marker, max_keys):
    "Get bucket listing with a GET.\n\n    Args:\n      bucketpath: gs bucket path of form '/bucket'\n      prefix: prefix to limit listing.\n      marker: a str after which to start listing.\n      max_keys: max size of listing.\n\n    See https://developers.google.com/storage/docs/reference-methods#getbucket\n    for details.\n\n    Returns:\n      A list of CSFileStat sorted by filename.\n    "
    common.validate_bucket_path(bucketpath)
    q = _AE_GCSFileInfo_.all(namespace='')
    fully_qualified_prefix = '/'.join([bucketpath, prefix])
    if marker:
        q.filter('filename >', '/'.join([bucketpath, marker]))
    else:
        q.filter('filename >=', fully_qualified_prefix)
    result = []
    for info in q.run(limit=max_keys):
        if (not info.filename.startswith(fully_qualified_prefix)):
            break
        result.append(common.CSFileStat(filename=info.filename, st_size=info.size, st_ctime=calendar.timegm(info.creation.utctimetuple()), etag=info.etag))
    return result

dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/cloudstorage/cloudstorage_stub.py CloudStorageStub.get_bucket/original