title: android FileWriter cannot open file ( file not found)
body: <p>I am trying to write a fake csv file , but I always get an IOException : file not found
  my code seems correct, but I may have missed something somewhere ...
  exception is raised on the filewriter = new FileWriter line </p>
  
  <pre><code>java.io.File file;
  file = new File(context.getExternalFilesDir(null), "/swimmer/trainings/");
  String mTrainingsPath = file.getPath();
  
  String csvFilePath = mTrainingsPath + java.io.File.separator + training.filename;    
  file = new File( csvFilePath);
  
   try {
   FileWriter fileWriter = new FileWriter( file );
   PrintWriter csvOut = new PrintWriter( fileWriter );
  
  String data = "Lorem ipsum dolor sit amet, consectetur adipiscing elit.\\n" 
  + " Cras facilisis elit eu nisl laoreet mollis.\\n" 
  + " In feugiat nec elit at tincidunt.";
  
  csvOut.println( data );
  csvOut.close();
  
  } catch( IOException e ) {
  Log.e(TAG, "IOException in creating csv file");
  Log.e(TAG, "STACKTRACE");
  Log.e(TAG, Log.getStackTraceString(e));
   }
  </code></pre>
  
  <p>here is the log file :</p>
  
  <pre><code>java.io.FileNotFoundException: /storage/emulated/0/Android/data/com.swimtechtest.swimmer/files/swimmer/trainings/myFirstTraining.csv: open failed: ENOENT (No such file or directory)
  at libcore.io.IoBridge.open(IoBridge.java:409)
  at java.io.FileOutputStream.&lt;init&gt;(FileOutputStream.java:88)
  at java.io.FileOutputStream.&lt;init&gt;(FileOutputStream.java:73)
  at java.io.FileWriter.&lt;init&gt;(FileWriter.java:42)
  at ...swimmer.database.DatabaseHandler.putFakeTraining(DatabaseHandler.java:86
  </code></pre>
  
  <p>directory /storage/emulated/0/Android/data/com.swimtechtest.swimmer/files/swimmer/trainings/ exists (created previously)</p>