Return an absolute version of this path. This function works even if the path doesn't point to anything. No normalization is done, i.e. all '.' and '..' will be kept along. Use resolve() to get the canonical path to a file.
(self)
| 1314 | yield p |
| 1315 | |
| 1316 | def absolute(self): |
| 1317 | """Return an absolute version of this path. This function works |
| 1318 | even if the path doesn't point to anything. |
| 1319 | |
| 1320 | No normalization is done, i.e. all '.' and '..' will be kept along. |
| 1321 | Use resolve() to get the canonical path to a file. |
| 1322 | """ |
| 1323 | # XXX untested yet! |
| 1324 | if self._closed: |
| 1325 | self._raise_closed() |
| 1326 | if self.is_absolute(): |
| 1327 | return self |
| 1328 | # FIXME this must defer to the specific flavour (and, under Windows, |
| 1329 | # use nt._getfullpathname()) |
| 1330 | obj = self._from_parts([os.getcwd()] + self._parts, init=False) |
| 1331 | obj._init(template=self) |
| 1332 | return obj |
| 1333 | |
| 1334 | def resolve(self, strict=False): |
| 1335 | """ |
no test coverage detected