Skip to content

Instantly share code, notes, and snippets.

@timpulver
Created July 12, 2012 16:56
Show Gist options
  • Save timpulver/3099301 to your computer and use it in GitHub Desktop.
Save timpulver/3099301 to your computer and use it in GitHub Desktop.
[P5] How to get the DATA directory
//Sometimes we need the path to the Processing data directory.
// creates a virtual file within the data directory
File file = new File(dataPath("") + File.separator + "a_filename.txt");
//using dataPath("..."), the path can be altered, too (when using "", this is not the case).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment