(self, url=None, open=open, unlink=os.unlink, sep=os.sep,
encoding=default_encoding, *args, **kwargs)
| 34 | """ |
| 35 | |
| 36 | def __init__(self, url=None, open=open, unlink=os.unlink, sep=os.sep, |
| 37 | encoding=default_encoding, *args, **kwargs): |
| 38 | super().__init__(*args, **kwargs) |
| 39 | self.url = url |
| 40 | path = self._find_path(url) |
| 41 | |
| 42 | # Remove forwarding "/" for Windows os |
| 43 | if os.name == "nt" and path.startswith("/"): |
| 44 | path = path[1:] |
| 45 | |
| 46 | # We need the path and separator as bytes objects |
| 47 | self.path = path.encode(encoding) |
| 48 | self.sep = sep.encode(encoding) |
| 49 | |
| 50 | self.open = open |
| 51 | self.unlink = unlink |
| 52 | |
| 53 | # Let's verify that we've everything setup right |
| 54 | self._do_directory_test(b'.fs-backend-' + uuid().encode(encoding)) |
| 55 | |
| 56 | def __reduce__(self, args=(), kwargs=None): |
| 57 | kwargs = {} if not kwargs else kwargs |
nothing calls this directly
no test coverage detected