Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: LGPL 

import java.io.File;

import java.io.IOException;

public class Main {
    public static File createTempDir() throws IOException {
        File temp;

        temp = File.createTempFile("encfs-java-tmp", Long.toString(System.nanoTime()));
        if (!temp.delete()) {
            throw new IOException("Could not delete temporary file " + temp.getAbsolutePath());
        }

        if (!temp.mkdir()) {
            throw new IOException("Could not create temporary directory");
        }

        return temp;
    }
}