forked from External/mage
[feature] Card images are now saved and read from zip files
This commit is contained in:
parent
e0d4285a69
commit
fa82f1b159
5 changed files with 111 additions and 106 deletions
|
|
@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue