• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

diference between mkdirs and mkdirs?

 
Mauricio Archbold Babroza
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

what is the diference between make directories, with mkdir and mkdirs???
thanks....
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65128
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's all explained in the javadoc for java.io.File.
 
Bitzu Ma
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Say you have this:
File f = new File("./folder1/folder2");

f.mkdir() will create only folder2 and only if folder1 already exists on the specified path
f.mkdirs() will create the entire path: if folder1 doesn't exist it will create it and the it will create the subfolder folder2
 
Mauricio Archbold Babroza
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
 
sumit kothalikar
Ranch Hand
Posts: 91
Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi
Mauricio ,

If you got the solution of your post here.
Please mark your post as
resolved
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic