Sujet : Re: Python (was Re: I did not inhale)
De : commodorejohn (at) *nospam* gmail.com (John Ames)
Groupes : comp.unix.shell comp.unix.programmer comp.lang.miscDate : 19. Aug 2024, 21:30:05
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240819133005.00003757@gmail.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
User-Agent : Claws Mail 4.2.0 (GTK 3.24.38; x86_64-w64-mingw32)
On Mon, 19 Aug 2024 13:14:00 -0700
Keith Thompson <Keith.S.Thompson+
u@gmail.com> wrote:
I happen to be typing this on a Windows laptop (via ssh to another
system). The system drive is called "C:", and I don't know of any
other name by which I can refer to it. If I examine its properties
in Windows Explorer, it appears to have the label "Acer", but that's
not the "messy string with lots of backslashes" you referred to.
It strikes me that "C:" is the drive's "official" name in any
reasonable sense of the word.
What API are you referring to, what can I expect it to give me as the
"official" name of my C: drive, and what could I do with that name?
NT has its own low-level scheme for identifying devices/representing
file paths. If you're curious, someone at the Google compound did a
write-up on it some years back:
https://googleprojectzero.blogspot.com/2016/02/the-definitive-guide-on-win32-to-nt.htmlFor most practical purposes, users and user-level application software
pretty much never see this or have to think about it - but it *is*
there, and it does cause strange corner-case behavior sometimes. (I'm
pretty sure the underlying reason why cmd.exe sometimes cannot access
network shares mapped to a conventional drive letter has to do with
this, f'rinstance.)