I don't (yet, I hope to change this!) know Python well enough to do up a
dospath for you, but I can precisely describe the user (and syscall)
semantics of DOS pathnames.
DOS keeps a current selected drive. For each drive it keeps a current
working directory. So the sequence:
leaves you with your current selected drive still C:, and your current
working directory on C unchanged, but it changes your current working
directory on A:. A subsequent
would show that the current default on A: has been changed. DOS notices when
a disk changes (by some heuristics using the volume label and fat info) and
purges its old notion of that drives cwd on media change.
The command to change current working directory, CD, is independant of (and
doesn't overlap functionality with) the commands A:,B:,C:, etc. to change
currently selected drive.
The upshot of all this is that to parse a pathname, you strip off any
leading [a-z]: drive designation, then look for a leading separator. If that
separator is missing the path is relative to the cwd on that drive; and if
there was no drive designator than the path is relative to the current
drive. I guess its a matter of terminology, but I don't think it would be
wrong to say that an absolute pathname matches
On the other hand, you might want to ignore the multi-drive support in DOS,
leaving a model that's more simply harmonious with Unix. In which case, an
absolute pathname must match
I'd say operations like dirname would leave the drive designator attached to
the root, or the first directory component.
Does any of this help?