Hello there I want to create the directories and sub directories with the java. My directory structure is starts from the current application directory, Means in current projects directory which looks like following...
Images
|
|+ Background
|
|+ Foreground
|
|+Necklace
|+Earrings
|+Etc...
I know how to create directory but I need to create sub directory I tried with following code what should be next steps ?
File file = new File("Images");
file.mkdir();
You can use File.mkdir() or File.mkdirs() to create a directory. Between the two, the latter method is more tolerant and will create all intermediate directories as needed. Also, since I see that you use "\\" in your question, I would suggest using File.separator for a portable path separator string.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments