Utils.java Source code

Java tutorial

Introduction

Here is the source code for Utils.java

Source

import java.io.File;
import java.io.IOException;

public class Utils {
    /**
     * Creates a new empty temporary directory.
     */
    public static File createTmpDir() throws IOException {
        // create a temporary directory
        File tmpFile = File.createTempFile("tmp", "tmp", new File("."));
        tmpFile.delete();
        tmpFile.mkdir();
        return tmpFile;
    }

}