Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What's the purpose of File.getAbsoluteFile() method?

 
Karthikeyan Pandian
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all

can any one explain me the purpose of getABsoluteFile()
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17639
39
Android Eclipse IDE Linux
  • 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what "getABsoultefile()" is supposed to mean, but the java.io.File getAbsolutePath() method returns a string that corresponds to the absolute path of the File object. That is, the entire directory path all the way down from the filesystem root. I highly recommend it when there's likely to be doubt about what the current directory might might be, since the relative path might be confusing.

There's also something known as the "canonical path", which is simply the "official" absolute path. There can potentially be more than one absolute path to a file, especially on systems that allow soft-linked (alias) file paths. The canonical path is the one that is most direct.
 
Karthikeyan Pandian
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you buddy for your explanation.....
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic