samefile() on windows platform?

Martin Bless m.bless at gmx.de
Wed Apr 25 16:43:50 EDT 2001


os.path.samefile(...) isn't available on the windows platform. With
DOS/windows a drive may be substituted with the consequence that
"x:\test.tmp" and "c:\abc\test.tmp" may actually refer to the same
file.

How can I find the truename of a filespec?
Without opening the file, as the intent is to prevent overwriting ...

DOS used to have an interrupt returning the full expanded "truename"
of a file. Is there an equivalent function somewhere in the winapi? If
so I wasn't able to find it yet. How is it done?

Thanks for any hint.

Martin




More information about the Python-list mailing list