Very basic file reading question - where is the data directory?

  • By default Processing looks for a filename at the sketchPath() 1st.
  • Only if it doesn’t find it there it looks at dataPath().
  • By default Processing saves everything on the sketchPath().
  • Wrap a filename on dataPath() in order to save it on subfolder “data/”.

An example sketch using dataFile() + listPaths():

2 Likes