Skip to content

Commit 26e200f

Browse files
author
Scott Sanders
committed
Added a simple mkdir() function.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/io/trunk@140291 13f79535-47bb-0310-9956-ffa450edef68
1 parent 0010fca commit 26e200f

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/java/org/apache/commons/io/FileUtils.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
* @author <a href="mailto:sanders@apache.org">Scott Sanders</a>
7373
* @author <a href="mailto:dlr@finemaltcoding.com">Daniel Rall</a>
7474
* @author <a href="mailto:Christoph.Reck@dlr.de">Christoph.Reck</a>
75-
* @version $Id: FileUtils.java,v 1.3 2002/01/28 05:01:48 sanders Exp $
75+
* @version $Id: FileUtils.java,v 1.4 2002/01/28 10:01:25 sanders Exp $
7676
*/
7777
public class FileUtils {
7878

@@ -369,4 +369,14 @@ private static boolean isValidFile(String file, String[] extensions) {
369369

370370
}
371371

372+
/**
373+
* Simple way to make a directory
374+
*/
375+
public void mkdir(String dir) {
376+
File file = new File(dir);
377+
if (!file.exists()) {
378+
file.mkdirs();
379+
}
380+
}
381+
372382
}

0 commit comments

Comments
 (0)