This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

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

can any one explain me the purpose of getABsoluteFile()
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Likes 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you buddy for your explanation.....
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!