devxlogo

File Paths

File Paths

Question:
How do I grab a file’s absolute path, given a filename?

Answer:
All you have to do is create a File object corresponding to the filename and call getAbsolutePath().

devx-admin

Share the Post: