mkdir - Java File Path IO

Java examples for File Path IO:Directory Create

Description

mkdir

Demo Code


import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.ArrayList;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import org.apache.log4j.Logger;

public class Main{
    private static final Logger logger = Logger.getLogger(FileHelper.class);
    /**//from   www.j  a  v  a2  s.  com
     * @param foldername
     */
    public static void mkdir(String foldername) {

        logger.debug("..");

        File folder = new File(foldername);

        if (!folder.exists()) {
            folder.mkdirs();
        }

    }
}

Related Tutorials