wood burning stoves*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes diference between mkdirs and mkdirs? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "diference between mkdirs and mkdirs?" Watch "diference between mkdirs and mkdirs?" New topic
Author

diference between mkdirs and mkdirs?

Mauricio Archbold Babroza
Greenhorn

Joined: Apr 01, 2009
Posts: 11

what is the diference between make directories, with mkdir and mkdirs???
thanks....
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

It's all explained in the javadoc for java.io.File.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bitzu Ma
Greenhorn

Joined: Feb 18, 2010
Posts: 6
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

Joined: Apr 01, 2009
Posts: 11
thanks
sumit kothalikar
Ranch Hand

Joined: Apr 15, 2010
Posts: 91


Hi
Mauricio ,

If you got the solution of your post here.
Please mark your post as
resolved


Thanks & Regards
Sumit Kothalikar
 
Consider Paul's rocket mass heater.
 
subject: diference between mkdirs and mkdirs?
 
Similar Threads
what is tcp??IP??diference between them??
Favorite saying/punchline
addHeader(String, String) vs. setHeader(String, String)
jdk
help needed with creating folder