Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is meant by canonical path and canonical file?

Canonical file meant path
0
Posted

What is meant by canonical path and canonical file?

0

Location: http://www.jguru.com/faq/view.jsp?EID=42115 Created: Apr 28, 2000 Modified: 2001-08-18 17:13:15.078 Author: Ken Graham (http://www.jguru.com/guru/viewbio.jsp?EID=26759) Question originally posed by sharma MR (http://www.jguru.com/guru/viewbio.jsp?EID=4939 First – both Absolute and Canonical forms are OS dependent per the API documentation for java.io.File. Second – Absolute is not absolute. It is not a resolved path name. If File f is not already an absolute path name, according to OS dependent rules, then it simply prepends the value of System.getProperty(“user.dir”). However, don’t think that you can use setProperty(“user.dir”,otherdir), because it will be ignored under Windows. At some future point Sun may change their mind regarding this. :-))))) Thirdly – Canonical is resolved, but in an OS dependent form. Therefore, if you want to really know about the name of the file avoid either of these two methods, and use File.toURL().toExternalForm() instead. The form is resolved

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123