Changes in getCanonical Path behaviour

R

Roedy Green

In the olden days, on Windows, File.getCanonicalPath would look the
file up in the directory and find out its precise case and return that
to you. Now it returns the same thing as getAbsolutePath, echoing the
case of the filename as you gave it.
 
C

Chris Smith

Roedy Green said:
In the olden days, on Windows, File.getCanonicalPath would look the
file up in the directory and find out its precise case and return that
to you. Now it returns the same thing as getAbsolutePath, echoing the
case of the filename as you gave it.

"Now"? I don't see that behavior with Java 1.5.0-b64. On what version
do you see this behavior?

--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
R

Roedy Green

In the olden days, on Windows, File.getCanonicalPath would look the
file up in the directory and find out its precise case and return that
to you. Now it returns the same thing as getAbsolutePath, echoing the
case of the filename as you gave it.

oops. My mistake. I did not set up the test files correctly. I was
getting results for a non-existent file, which of course has no define
canonical case.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top