#NEWLINE# def stat( filename , retry_params = None , _account_id = None ) : #NEWLINE# #INDENT# "Get GCSFileStat of a Google Cloud storage file.\n\n  Args:\n    filename: A Google Cloud Storage filename of form '/bucket/filename'.\n    retry_params: An api_utils.RetryParams for this call to GCS. If None,\n      the default one is used.\n    _account_id: Internal-use only.\n\n  Returns:\n    a GCSFileStat object containing info about this file.\n\n  Raises:\n    errors.AuthorizationError: if authorization failed.\n    errors.NotFoundError: if an object that's expected to exist doesn't.\n  " #NEWLINE# common . validate_file_path ( filename ) #NEWLINE# api = storage_api . _get_storage_api ( retry_params = retry_params , account_id = _account_id ) #NEWLINE# ( status , headers , content ) = api . head_object ( api_utils . _quote_filename ( filename ) ) #NEWLINE# errors . check_status ( status , [ 200 ] , filename , resp_headers = status , body = content ) #NEWLINE# file_stat = common . GCSFileStat ( filename = filename , st_size = headers . get ( 'content-length' ) , st_ctime = common . http_time_to_posix ( headers . get ( 'last-modified' ) ) , etag = headers . get ( 'etag' ) , content_type = headers . get ( 'content-type' ) , metadata = common . get_metadata ( headers ) ) #NEWLINE# return file_stat