views:

344

answers:

3

There is a canonical path concept in Java.
And there is a fully-qualified path in WinApi.

I know well what canonical path is, but I don't understand fully-qualified path's concepts.

For a file or directory, does fully-qulified path exist only one thing? -like canonical path.

Are both of them totally same concepts?

Edit:
One more thing, Is a symbloc link or a hard link belong to Fully qualified path?

Edit
I asked someone who maintains Naming Files, Paths, and Namespaces page to let me know this.
And he replied me.

Is this also Fully-qualified path?
C:\directory\..\directory\file.txt

Technically that is a relative path because it contains the double dot (..) and some APIs do not process those correctly (the docs will clearly state that it needs a fully qualified path).
The two are mutually exclusive.

What he means is, in my guessing, if we put a param like this "C:\directory\..\directory\file.txt" to the function required fully-qualified path, the function never reinterpret the path and then fails.

If so, fully-qualified path is totally same with an canonical path. Isn't it.

A: 

http://stackoverflow.com/questions/1099300/whats-the-difference-between-getpath-getabsolutepath-and-getcanonicalpath

Looks at the above question.Hopefully You will get your answer.

Anil Vishnoi
Thanks Anil. But I already read the link. It explains difference between canonical path and absolute path. What I want to know is Fully qualified path's concepts.
Benjamin
Benjamin, if that's the case, you need to change the title of this question.
Rodney Gitzel
A: 

No. IMHO, fully-qualified path only lets you find the resource in unambiguous manner (independent on the current working directory, PATH environ, etc) but two different paths may identify the same resource.

I am unaware of a windows way of knowing if two paths point to the same file.

Pavel Radzivilovsky
It doesn't. Exploiting this is one way to get the same dll mapped multiple times into memory.
Chris Becke
+13  A: 
Bert F
You drive through a portal in the middle of the street and end up at the destination of the symlink ;)
Michael Mior
*I'd suggest that page needs to make that clearer.* Yes, so do I!
Benjamin
+1 For the addendum.
Benjamin
+1, nice thorough explanation.
snemarch