Commit 30995c07 by rfkelly0

S3FS: include etag in getinfo() output

parent 80aa5c08
...@@ -442,6 +442,8 @@ class S3FS(FS): ...@@ -442,6 +442,8 @@ class S3FS(FS):
info["st_mode"] = 0700 | statinfo.S_IFREG info["st_mode"] = 0700 | statinfo.S_IFREG
if hasattr(key,"size"): if hasattr(key,"size"):
info['size'] = int(key.size) info['size'] = int(key.size)
if hasattr(key,"md5"):
info['etag'] = key.md5
if hasattr(key,"last_modified"): if hasattr(key,"last_modified"):
# TODO: does S3 use any other formats? # TODO: does S3 use any other formats?
fmt = "%a, %d %b %Y %H:%M:%S %Z" fmt = "%a, %d %b %Y %H:%M:%S %Z"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment