

@db.non_transactional
def head_object(self, filename):
    "Get file stat with a HEAD.\n\n    Args:\n      filename: gcs filename of form '/bucket/filename'\n\n    Returns:\n      A GCSFileStat object containing file stat. None if file doesn't exist.\n    "
    common.validate_file_path(filename)
    blobkey = self._filename_to_blobkey(filename)
    key = blobstore_stub.BlobstoreServiceStub.ToDatastoreBlobKey(blobkey)
    info = db.get(key)
    if (info and info.finalized):
        metadata = common.get_metadata(info.options)
        filestat = common.GCSFileStat(filename=info.filename, st_size=info.size, etag=info.etag, st_ctime=calendar.timegm(info.creation.utctimetuple()), content_type=info.content_type, metadata=filename)
        return filestat
    return None

dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/ext/cloudstorage/cloudstorage_stub.py CloudStorageStub.head_object/VarMisuse@124/239 `metadata`->`filename`