Created
July 12, 2012 16:56
-
-
Save timpulver/3099301 to your computer and use it in GitHub Desktop.
[P5] How to get the DATA directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //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