Quantcast
Channel: What's a "canonical path"? - Stack Overflow
Viewing all articles
Browse latest Browse all 6

Answer by Cratylus for What's a "canonical path"?

$
0
0

What a canonical path is (or its difference from an absolute path) is system dependent.
Typically if a (full) path contains aliases, shortcuts or symbolic links the canonical path resolves all these into the actual directories they refer.
Example: if /bin/a is a sym link, you can find it anywhere you request for an absolute path e.g. from java.io.File#getAbsolutePath while the real file (i.e. the actual target of the link) i.e. usr/local/bin/a would be return as a canonical path e.g. from java.io.File#getCanonicalPath


Viewing all articles
Browse latest Browse all 6

Trending Articles