def get_file_size(self, path: PATH_TYPES) -> int: """Return the file size of provided path.""" if not isinstance(path, pathlib.Path): path = pathlib.Path(path) return path.stat().st_size
def get_upload_time(self, path: PATH_TYPES) -> datetime.datetime: if not isinstance(path, pathlib.Path): path = pathlib.Path(path) return datetime.datetime.fromtimestamp(path.stat().st_mtime, datetime.timezone.utc)
def get_file_size(self, path: PATH_TYPES) -> int: if not isinstance(path, self.PATH_BACKEND): path = self.PATH_BACKEND(path) return int(path.stat().st_size)