I am trying to use CSVWriter to write to a file for my android project.
As part of my folder structure I have created a folder called myData and within that have a CSV file called results.csv
String csvpath = Environment.getExternalStorageDirectory().getAbsolutePath();
CSVWriter csvw = new CSVWriter(new FileWriter(csvpath+"/myData/results.csv"));
However I get the following exception
java.io.FileNotFoundException: /storage/emulated/0/myData/results.csv: open failed: ENOENT (No such file or directory)
I have also added:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
How can I get the correct path for this file?