[feature] Card images are now saved and read from zip files

This commit is contained in:
North 2012-09-07 20:09:29 +03:00
parent e0d4285a69
commit fa82f1b159
5 changed files with 111 additions and 106 deletions

View file

@ -1,23 +0,0 @@
package mage.client.util;
import java.io.File;
public class FileUtils {
public static File getTempDir(String key) {
String tmpDir = System.getProperty("java.io.tmpdir");
String sep = System.getProperty("file.separator");
if (!tmpDir.endsWith(sep))
tmpDir += sep;
tmpDir += key + "-" + java.util.UUID.randomUUID().toString();
File dir = new File(tmpDir);
if (!dir.mkdirs()) {
throw new RuntimeException("couldn't create temp directory " + tmpDir);
}
return dir;
}
}