MCPcopy Create free account
hub / github.com/tensorflow/tensorboard / stat

Method stat

tensorboard/compat/tensorflow_stub/io/gfile.py:210–218  ·  view source on GitHub ↗

Returns file statistics for a given path.

(self, filename)

Source from the content-addressed store, hash-verified

208 os.makedirs(path, exist_ok=True)
209
210 def stat(self, filename):
211 """Returns file statistics for a given path."""
212 # NOTE: Size of the file is given by .st_size as returned from
213 # os.stat(), but we convert to .length
214 try:
215 file_length = os.stat(compat.as_bytes(filename)).st_size
216 except OSError:
217 raise errors.NotFoundError(None, None, "Could not find file")
218 return StatData(file_length)
219
220
221class S3FileSystem:

Callers

nothing calls this directly

Calls 2

StatDataClass · 0.85
statMethod · 0.45

Tested by

no test coverage detected