Create all directories up to a point?

Posted by Stefan Kendall on Stack Overflow See other posts from Stack Overflow or by Stefan Kendall
Published on 2010-04-05T16:40:26Z Indexed on 2010/04/05 16:43 UTC
Read the original article Hit count: 244

Filed under:
|
|

I need to be able to build all directories up to and including the directory specified by my File object. For example, suppose I have something like this:

File file = new File( "/var/a/b/c/d/" );

But only /var/ exists. I need a method that builds up to d, and I was wondering if there was a method in a java io library somewhere that does this already.

© Stack Overflow or respective owner

Related posts about java

Related posts about file-io