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