create Temp Dir - Java File Path IO

Java examples for File Path IO:Temporary File

Description

create Temp Dir

Demo Code


import java.io.*;
import java.net.*;
import java.util.*;
import java.util.zip.*;
import org.apache.log4j.*;

public class Main{
    public static File createTempDir(String name, String ext)
            throws Exception {
        File f = File.createTempFile(name, ext);
        f.delete();/*from  w  ww  .  ja va  2s.c  o m*/
        f.mkdirs();
        return f;
    }
}

Related Tutorials