Mail Archives: djgpp/1998/02/26/06:25:21
Eli Zaretskii wrote:
> I would be interested to know how to
> yield a unique file name spec without doing all these ``weird'' things
> (some of which `_fixpath' doesn't do, btw). A unique name presumably
> means that you can find out whether any given two files are the same by
> doing a simple string comparison. So how would you go about
> canonicalizing a file name if not by converting it to the shortest
> absolute path from the root?
Like is said to you in private email, the internal DOS' truename already
does this automagically. IIRC it is INT21 - FN 60h, but I might be (a
little bit) wrong.
That function was undocumented during a long period, but it did exist
from early DOS versions on. It seems a quite relyable method for finding
a "canonicalized" name.
A funny thing I discovered is that
"prn" is converted to "x:/dev/lpt1"
--
\ Vik /-_-_-_-_-_-_/
\___/ Heyndrickx /
\ /-_-_-_-_-_-_/
- Raw text -