Hi everyone, is there a way that I can load a file in a folder?
for example:
randomString = loadString("somerandomfolder\anotherrandomfolder\finallythestringiwant.txt");
Just like Minecraft data files, there is a lot of subfolders.
Hi everyone, is there a way that I can load a file in a folder?
for example:
randomString = loadString("somerandomfolder\anotherrandomfolder\finallythestringiwant.txt");
Just like Minecraft data files, there is a lot of subfolders.
I’m assuming you are trying to get strings out of a textfile by your example.
Try the loadStrings() method.
No, no, no. I don’t mean that. I mean like I got a folder called “something” in my data folder, and I have a text file in my something folder. Like this…
.codefile
. . codefile.pde
. . data
. . . . anotherthing.txt
. . . . something
. . . . . .thing.txt
I know I can load anotherthing.txt, but how to load the thing.txt?
Or I simply can’t?
Are there ways I can load that text file?
Sorry for the late reply, anyway.
final String[] things = loadStrings("something/thing.txt");
Wow! It really works! Thanks!!!