We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Global data directory
Page Index Toggle Pages: 1
Global data directory? (Read 887 times)
Global data directory?
Jan 22nd, 2010, 2:43am
 
Hi,

just wanted to know if there is the possibility to copy my data into a global data directory so that i do not need to copy my music files into each sketch. I work with .wav files and i don't want to waste too much space on my hard disk.  Cheesy
Re: Global data directory?
Reply #1 - Jan 22nd, 2010, 4:45am
 
Just put an absolute path where Processing wants a file name:
final String PATH = "E:/Documents/Processing data/";
PImage img = loadImage(PATH + "pict.png");
loadAndPlay(PATH + "Everybody has something to hide except me and my monkey.mp3");

and so on.
Re: Global data directory?
Reply #2 - Jan 22nd, 2010, 2:08pm
 
Oh, could have thought of that myself.. Thanks!
Page Index Toggle Pages: 1