how do u creat folders with java?
Printable View
how do u creat folders with java?
mad_fox9007,
Try this, I hope it helps...
http://help.eclipse.org/help30/index...s/tasks-14.htm
Help - Eclipse Platform
http://help.eclipse.org/help30/index...ce/ref-152.htm
Help - Eclipse Platform
Eg :)
Hi,
You mean this ? ............... :)Quote:
how do u creat folders with java?
Code:import java.io.*;
class DirTest
{
public static void main(String args[])
{
boolean succ = (new File("Dirname")).mkdir();
if (!succ)
{
System.out.println("Creation failed");
}
else System.out.println("Created");
}
}
--Good Luck--
Reference url: http://javaalmanac.com/egs/java.io/CreateDir.htmlCode:// Create a directory; all ancestor directories must exist
boolean success = (new File("directoryName")).mkdir();
if (!success) {
// Directory creation failed
}
// Create a directory; all non-existent ancestor directories are
// automatically created
success = (new File("directoryName")).mkdirs();
if (!success) {
// Directory creation failed
}
thanks