yeah the absolute path works,
thx PhilHo and Credic!
i'm on a pc atm but do you guys have any idea where the temp dir is on a mac?
also for the relative path for some reason i can't get that to work.
I have a map called data in my C:/WINDOWS/TEMP
in the map data is another map.
if i use File dir = new File("data");
then it reports
Folder does not exist or cannot be accessed.
if i use "/" then it reports all files on C:/
if i use "/WINDOWS" then it reports the files in there so doesn't it always start at the beginning of the local drive? Or do i have to use other semicolons or something for a relative path?
Code:File dir = new File("/");
String[] list = dir.list();
if (list == null) {
println("Folder does not exist or cannot be accessed.");
}
else {
println(list);
}
Quote:[0] "$AVG8.VAULT$"
[1] "ATI"
[2] "Autodesk"
[3] "AUTOEXEC.BAT"
[4] "boot.ini"
[5] "CONFIG.SYS"
[6] "data"
[7] "df2cfd0d650df4800c6199458211fdc0"
[8] "Documents and Settings"
[9] "HammerAutosave"
[10] "Intel"
[11] "IO.SYS"
[12] "MSDOS.SYS"
[13] "MSOCache"
[14] "NTDETECT.COM"
[15] "ntldr"
[16] "OkiDriver"
[17] "pagefile.sys"
[18] "Program Files"
[19] "RaidTool"
[20] "RECYCLER"
[21] "Softimage"
[22] "spm"
[23] "sqmdata00.sqm"
[24] "sqmdata01.sqm"
[25] "sqmdata02.sqm"
[26] "sqmdata03.sqm"
[27] "sqmdata04.sqm"
[28] "sqmdata05.sqm"
[29] "sqmdata06.sqm"
[30] "sqmdata07.sqm"
[31] "sqmdata08.sqm"
[32] "sqmdata09.sqm"
[33] "sqmdata10.sqm"
[34] "sqmdata11.sqm"
[35] "sqmdata12.sqm"
[36] "sqmdata13.sqm"
[37] "sqmdata14.sqm"
[38] "sqmdata15.sqm"
[39] "sqmdata16.sqm"
[40] "sqmdata17.sqm"
[41] "sqmdata18.sqm"
[42] "sqmdata19.sqm"
[43] "sqmnoopt00.sqm"
[44] "sqmnoopt01.sqm"
[45] "sqmnoopt02.sqm"
[46] "sqmnoopt03.sqm"
[47] "sqmnoopt04.sqm"
[48] "sqmnoopt05.sqm"
[49] "sqmnoopt06.sqm"
[50] "sqmnoopt07.sqm"
[51] "sqmnoopt08.sqm"
[52] "sqmnoopt09.sqm"
[53] "sqmnoopt10.sqm"
[54] "sqmnoopt11.sqm"
[55] "sqmnoopt12.sqm"
[56] "sqmnoopt13.sqm"
[57] "sqmnoopt14.sqm"
[58] "sqmnoopt15.sqm"
[59] "sqmnoopt16.sqm"
[60] "sqmnoopt17.sqm"
[61] "sqmnoopt18.sqm"
[62] "sqmnoopt19.sqm"
[63] "System Volume Information"
[64] "temp.xsi"
[65] "users"
[66] "WINDOWS"