Skip to content

Commit

Permalink
expose 'mode' attribute to be compliant with the interface required b…
Browse files Browse the repository at this point in the history
…y the latest fs version (#40)
  • Loading branch information
mathiaseitz committed Feb 24, 2021
1 parent 2344f4e commit deee759
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs_gcsfs/_gcsfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,10 @@ def writable(self):
def writelines(self, lines):
return self._f.writelines(lines)

@property
def mode(self):
return self.__mode.to_platform_bin()

def read(self, n=-1):
if not self.__mode.reading:
raise IOError("not open for reading")
Expand Down

0 comments on commit deee759

Please sign in to comment.