Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products. If you have feedback or questions as you navigate the site, click Send Feedback.

Python 2 is no longer supported by the community. We recommend that you migrate Python 2 apps to Python 3.

The GCSFileStat Class

Stay organized with collections Save and categorize content based on your preferences.

GCSFileStat is provided by the App Engine client library for Cloud Storage contained in /src/cloudstorage. This class is used to store file stat data from cloudstorage.stat().

Instance Properties

A GCSFileStat instance has the following properties:

filename
String. The name of the file that this file stat is describing, in the format /bucket/object. For example, /my_bucket/lyrics/southamerica/list5.txt.
is_dir
True if this represents a directory. False if this is a real file.
st_size
Long compatible. The file size in bytes.
etag
String. The hex representation of the MD5 hash of the file's content.
st_ctime
Float compatible. The posix file creation time.
content_type
String. The file's content type.
metadata
Dict. Contains any user-specified metadata from thex-goog-meta- header. For example, {'x-goog-meta-foo': 'foo', 'x-goog-meta-bar': 'bar'}.