title: How to get the path of the sketch in Processing ? (dataPath not working)
body: <p>Using Processing 3-0-1 (not updated yet), I have a problem with the dataPath() function.</p>
  
  <p>My code :</p>
  
  <pre><code>final String path = dataPath("");
  //...
  void setup(){
    //...
    println(path);
    //...
  }
  </code></pre>
  
  <p>This displays in the console :</p>
  
  <blockquote>
    <p>/media/ubuntu/Expansion Drive/Programmation/Java/Processing/Ubuntu/processing-3.0.1/null/data</p>
  </blockquote>
  
  <p>but it should display (according to the Documentation and my tries in other projects) :</p>
  
  <blockquote>
    <p>/media/ubuntu/Expansion Drive/Programmation/Java/Processing/Projets/Time_Fighter/data</p>
  </blockquote>
  
  <p>So it seems it's returning a path the Processing instead of a path to my project ? Plus, why is there a 'null' ?</p>
  
  <p><strong>The question is, do you know a way that would work to have the path of my sketch ?</strong></p>
  
  <p><strong>PS.</strong>
  A friend of mine proposed to use the File class instead, I had this result :</p>
  
  <pre><code>File file = new File("data");
  //...
  void setup(){
    //...
    file.getAbsolutePath();
    //...
  }
  </code></pre>
  
  <p>Which returned :</p>
  
  <blockquote>
    <p>/media/ubuntu/Expansion Drive/Programmation/Java/Processing/Ubuntu/processing-3.0.1/data</p>
  </blockquote>
  
  <p><strong>PPS.</strong>
  I'm using Ubuntu (Mate)...</p>