'Open the file pointed by this path and return a file object, as
the built-in open() function does.'

def open(self, mode='r', buffering=(-1), encoding=None, errors=None, newline=None):

    if self._closed:
        self._raise_closed()
    return io.open(self, mode, buffering, encoding, errors, newline, opener=self._opener)
