commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sand...@apache.org
Subject cvs commit: jakarta-commons-sandbox/io/src/java/org/apache/commons/io FileUtils.java
Date Mon, 28 Jan 2002 10:01:25 GMT
sanders     02/01/28 02:01:25

  Modified:    io/src/java/org/apache/commons/io FileUtils.java
  Log:
  Added a simple mkdir() function.
  
  Revision  Changes    Path
  1.4       +11 -1     jakarta-commons-sandbox/io/src/java/org/apache/commons/io/FileUtils.java
  
  Index: FileUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/FileUtils.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FileUtils.java	28 Jan 2002 05:01:48 -0000	1.3
  +++ FileUtils.java	28 Jan 2002 10:01:25 -0000	1.4
  @@ -72,7 +72,7 @@
    * @author <a href="mailto:sanders@apache.org">Scott Sanders</a>
    * @author <a href="mailto:dlr@finemaltcoding.com">Daniel Rall</a>
    * @author <a href="mailto:Christoph.Reck@dlr.de">Christoph.Reck</a>
  - * @version $Id: FileUtils.java,v 1.3 2002/01/28 05:01:48 sanders Exp $
  + * @version $Id: FileUtils.java,v 1.4 2002/01/28 10:01:25 sanders Exp $
    */
   public class FileUtils {
   
  @@ -367,6 +367,16 @@
   
           return false;
   
  +    }
  +
  +    /**
  +     * Simple way to make a directory
  +     */
  +    public void mkdir(String dir) {
  +        File file = new File(dir);
  +        if (!file.exists()) {
  +            file.mkdirs();
  +        }
       }
   
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message