Make the path absolute, resolving all symlinks on the way and also normalizing it (for example turning slashes into backslashes under Windows).
(self, strict=False)
| 1332 | return obj |
| 1333 | |
| 1334 | def resolve(self, strict=False): |
| 1335 | """ |
| 1336 | Make the path absolute, resolving all symlinks on the way and also |
| 1337 | normalizing it (for example turning slashes into backslashes under |
| 1338 | Windows). |
| 1339 | """ |
| 1340 | if self._closed: |
| 1341 | self._raise_closed() |
| 1342 | s = self._flavour.resolve(self, strict=strict) |
| 1343 | if s is None: |
| 1344 | # No symlink resolution => for consistency, raise an error if |
| 1345 | # the path doesn't exist or is forbidden |
| 1346 | self.stat() |
| 1347 | s = str(self.absolute()) |
| 1348 | # Now we have no symlinks in the path, it's safe to normalize it. |
| 1349 | normed = self._flavour.pathmod.normpath(s) |
| 1350 | obj = self._from_parts((normed,), init=False) |
| 1351 | obj._init(template=self) |
| 1352 | return obj |
| 1353 | |
| 1354 | def stat(self): |
| 1355 | """ |
nothing calls this directly
no test coverage detected