Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
GCSFileStat wird von der App Engine-Clientbibliothek für Cloud Storage bereitgestellt, die in /src/cloudstorage enthalten ist. Diese Klasse wird zum Speichern von Dateistatusdaten aus cloudstorage.stat() verwendet.
Instanzattribute
Eine GCSFileStat-Instanz hat die folgenden Eigenschaften:
filename
String Der Name der Datei, den diese Dateistatistik beschreibt, im Format /bucket/object. Beispiel: /my_bucket/lyrics/southamerica/list5.txt
is_dir
"True", wenn ein Verzeichnis dargestellt wird. "False", wenn es sich um eine echte Datei handelt.
st_size
Längenkompatibel. Die Dateigröße in Byte.
etag
String Die hexadezimale Darstellung des MD5-Hashwertes des Dateiinhalts.
st_ctime
Float-kompatibel. Der Erstellungszeitpunkt der Posix-Datei.
content_type
String Der Inhaltstyp der Datei.
metadata
Dict. Enthält alle vom Nutzer angegebenen Metadaten aus dem Header x-goog-meta-. Beispiel: {'x-goog-meta-foo': 'foo', 'x-goog-meta-bar': 'bar'}.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[[["\u003cp\u003e\u003ccode\u003eGCSFileStat\u003c/code\u003e stores file stat data retrieved from \u003ccode\u003ecloudstorage.stat()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt includes properties like \u003ccode\u003efilename\u003c/code\u003e, \u003ccode\u003eis_dir\u003c/code\u003e, \u003ccode\u003est_size\u003c/code\u003e, \u003ccode\u003eetag\u003c/code\u003e, \u003ccode\u003est_ctime\u003c/code\u003e, \u003ccode\u003econtent_type\u003c/code\u003e, and \u003ccode\u003emetadata\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003efilename\u003c/code\u003e represents the file's path in the format \u003ccode\u003e/bucket/object\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eis_dir\u003c/code\u003e indicates whether the entry is a directory or a file.\u003c/p\u003e\n"],["\u003cp\u003eWhen listed via \u003ccode\u003elistbucket\u003c/code\u003e, directory entries only contain \u003ccode\u003efilename\u003c/code\u003e, while file entries include all properties.\u003c/p\u003e\n"]]],[],null,["# The GCSFileStat Class\n\n`GCSFileStat` is provided by the App Engine client library for\nCloud Storage contained in `/src/cloudstorage`. This class is used to\nstore file stat data from [cloudstorage.stat()](/appengine/docs/legacy/standard/python/googlecloudstorageclient/functions#stat).\n\nInstance Properties\n-------------------\n\nA `GCSFileStat` instance has the following properties:\n\nfilename\n: String. The name of the file that this file stat is describing, in the\n format `/bucket/object`. For example, `/my_bucket/lyrics/southamerica/list5.txt`.\n\nis_dir\n: True if this represents a directory. False if this is a real file.\n\nst_size\n: Long compatible. The file size in bytes.\n\netag\n: String. The hex representation of the MD5 hash of the file's content.\n\nst_ctime\n: Float compatible. The posix file creation time.\n\ncontent_type\n: String. The file's content type.\n\nmetadata\n: Dict. Contains any user-specified metadata from the`x-goog-meta-`\n header. For example, {'x-goog-meta-foo': 'foo', 'x-goog-meta-bar': 'bar'}.\n| **Important:** When returned from a `listbucket` call, if the `is_dir` property is `True` then the object contains only the `filename`. If `is_dir` is `False`, then the object contains all of the properties."]]