Groups | Blog | Home
all groups > dotnet sdk > november 2005 >

dotnet sdk : Can I get a truename or canonical filename without using interop?


Robert Houben
11/16/2005 10:45:11 PM
I want to know that two forms of an absolute filename reference the same
file. How would I do this without using interop, or is it even possible?

TIA,

David Thielen
11/28/2005 8:46:02 PM
Hello;

I think it is not possible because x:\data\file.dat may also be
\\server\share\file.dat where x: is \\server\root. You have no way of knowing
the directory root vs share point to on a server.

--
thanks - dave


[quoted text, click to view]
Raoul James
11/29/2005 9:23:09 AM
I agree that drive mappings can be hard to deal with, but what I'm looking
for is more things like this:

c:\mydir\myfilename.ext
\mydir\myfilename.ext
c:\mydir\myfile~1.ext

Java gives me a way to do this. I can create a file object and ask for the
canonical name.

I suspect that you're right. Everything I've found suggests that I'll have
to live without this functionality.

Thanks for the response!

[quoted text, click to view]

David Thielen
11/29/2005 9:40:02 AM
For that look at the FileInfo class - I think it can give you what you want.

--
thanks - dave


[quoted text, click to view]
AddThis Social Bookmark Button