Parse a path. Returns the parent folder and file name
(self, arg, remote=True)
| 1333 | ] |
| 1334 | |
| 1335 | def _parsepath(self, arg, remote=True): |
| 1336 | """ |
| 1337 | Parse a path. Returns the parent folder and file name |
| 1338 | """ |
| 1339 | # Find parent directory if it exists |
| 1340 | elt = (pathlib.PureWindowsPath if remote else pathlib.Path)(arg) |
| 1341 | eltpar = (pathlib.PureWindowsPath if remote else pathlib.Path)(".") |
| 1342 | eltname = elt.name |
| 1343 | if arg.endswith("/") or arg.endswith("\\"): |
| 1344 | eltpar = elt |
| 1345 | eltname = "" |
| 1346 | elif elt.parent and elt.parent.name or elt.is_absolute(): |
| 1347 | eltpar = elt.parent |
| 1348 | return eltpar, eltname |
| 1349 | |
| 1350 | def _fs_complete(self, arg, cond=None): |
| 1351 | """ |
no outgoing calls
no test coverage detected