mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2025-01-18 16:26:26 +01:00
make cachedir variable (use in extensions)
This commit is contained in:
parent
7ac33ef408
commit
1f7d9270c2
@ -17,8 +17,9 @@ import java.util.List;
|
||||
public class Cacher {
|
||||
|
||||
private static final String DEFAULT_CACHE_FILENAME = "cache.json";
|
||||
private static String cacheDir;
|
||||
|
||||
public static String getCacheDir() {
|
||||
static {
|
||||
File GEarthDir = null;
|
||||
try {
|
||||
GEarthDir = new File(Main.class.getProtectionDomain().getCodeSource().getLocation().toURI()).getParentFile();
|
||||
@ -26,15 +27,21 @@ public class Cacher {
|
||||
GEarthDir = GEarthDir.getParentFile();
|
||||
}
|
||||
|
||||
} catch (URISyntaxException e) {
|
||||
// e.printStackTrace();
|
||||
}
|
||||
} catch (URISyntaxException e) { }
|
||||
|
||||
return GEarthDir
|
||||
cacheDir = GEarthDir
|
||||
+ File.separator
|
||||
+ "Cache";
|
||||
}
|
||||
|
||||
public static void setCacheDir(String s) {
|
||||
cacheDir = s;
|
||||
}
|
||||
|
||||
public static String getCacheDir() {
|
||||
return cacheDir;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static boolean cacheFileExists(String cache_filename) {
|
||||
|
Loading…
Reference in New Issue
Block a user