JAVA Filewriter: Get the path of created File using FileWriter

Viewed 23134

I have created an CSV file using FILEWRITER and its creating the file in my workspace but I want to display the location (absolute path) of the path where file is created. I know we can use file.getAbsolutePath() if we have created file using FILE but since I have created the CSV file using FILEWRITER I am not sure how to get absolute path of created file. I tried converting it to String and then assigning it to FILE but still not able to get the location of the file. How to get the absolute Path of the file created using FILEWRITER?

2 Answers
Related