Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static File createTempDirectory()
- throws IOException
- {
- final File temp;
- temp = File.createTempFile("temp", Long.toString(System.nanoTime()));
- if(!(temp.delete()))
- {
- throw new IOException("Could not delete temp file: " + temp.getAbsolutePath());
- }
- if(!(temp.mkdir()))
- {
- throw new IOException("Could not create temp directory: " + temp.getAbsolutePath());
- }
- return (temp);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement