Open the file pointed by this path and return a file object, as the built-in open() function does.
(self, mode='r', buffering=-1, encoding=None,
errors=None, newline=None)
| 1373 | return grp.getgrgid(self.stat().st_gid).gr_name |
| 1374 | |
| 1375 | def open(self, mode='r', buffering=-1, encoding=None, |
| 1376 | errors=None, newline=None): |
| 1377 | """ |
| 1378 | Open the file pointed by this path and return a file object, as |
| 1379 | the built-in open() function does. |
| 1380 | """ |
| 1381 | if self._closed: |
| 1382 | self._raise_closed() |
| 1383 | if sys.version_info >= (3, 3): |
| 1384 | return io.open( |
| 1385 | str(self), mode, buffering, encoding, errors, newline, |
| 1386 | opener=self._opener) |
| 1387 | else: |
| 1388 | return io.open(str(self), mode, buffering, |
| 1389 | encoding, errors, newline) |
| 1390 | |
| 1391 | def read_bytes(self): |
| 1392 | """ |