diff --git a/s3fs/core.py b/s3fs/core.py index 889fdb0a..d5e59689 100644 --- a/s3fs/core.py +++ b/s3fs/core.py @@ -2296,6 +2296,13 @@ def __init__(self, fs, path, mode): self.mode = mode self.r = None self.loc = 0 + self._details = None + + @property + async def size(self): + if self._details is None: + self._details = await self.fs._info(self.path) + return self._details["size"] async def read(self, length=-1): if self.r is None: