projects
/
org.ibex.core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
163ff4c
)
2004/01/13 10:42:08
author
megacz
<megacz@xwt.org>
Fri, 30 Jan 2004 07:44:23 +0000
(07:44 +0000)
committer
megacz
<megacz@xwt.org>
Fri, 30 Jan 2004 07:44:23 +0000
(07:44 +0000)
darcs-hash:
20040130074423
-2ba56-
4bd7eeaa62a02070d29602d9b7271270e83c1bd2
.gz
src/org/xwt/LocalStorage.java
patch
|
blob
|
history
diff --git
a/src/org/xwt/LocalStorage.java
b/src/org/xwt/LocalStorage.java
index
1cca63a
..
2f94fe8
100644
(file)
--- a/
src/org/xwt/LocalStorage.java
+++ b/
src/org/xwt/LocalStorage.java
@@
-13,18
+13,18
@@
public class LocalStorage {
static String xwtDirName = System.getProperty("user.home") + java.io.File.separatorChar + ".xwt";
static String xwtDirName = System.getProperty("user.home") + java.io.File.separatorChar + ".xwt";
- static File xwtDir = null;
- static File cacheDir = null;
+ static java.io.File xwtDir = null;
+ static java.io.File cacheDir = null;
static {
try {
static {
try {
- xwtDir = new File(xwtDirName);
+ xwtDir = new java.io.File(xwtDirName);
if (!xwtDir.mkdirs()) xwtDir = null;
} catch (Exception e) {
Log.info(LocalStorage.class, "unable to create xwt directory " + xwtDirName);
}
try {
if (!xwtDir.mkdirs()) xwtDir = null;
} catch (Exception e) {
Log.info(LocalStorage.class, "unable to create xwt directory " + xwtDirName);
}
try {
- cacheDir = new File(xwtDirName + java.io.File.separatorChar + "cache");
+ cacheDir = new java.io.File(xwtDirName + java.io.File.separatorChar + "cache");
if (!cacheDir.mkdirs()) cacheDir = null;
} catch (Exception e) {
Log.info(LocalStorage.class, "unable to create cache directory " + xwtDirName + java.io.File.separatorChar + "cache");
if (!cacheDir.mkdirs()) cacheDir = null;
} catch (Exception e) {
Log.info(LocalStorage.class, "unable to create cache directory " + xwtDirName + java.io.File.separatorChar + "cache");
@@
-35,11
+35,11
@@
public class LocalStorage {
// FEATURE: we ought to be able to do stuff like sha1-checking and date checking on cached resources
public static class Cache {
// FEATURE: we ought to be able to do stuff like sha1-checking and date checking on cached resources
public static class Cache {
- private static void delTree(File f) throws IOException {
+ private static void delTree(java.io.File f) throws IOException {
if (f.isDirectory()) {
String[] s = f.list();
for(int i=0; i<s.length; i++)
if (f.isDirectory()) {
String[] s = f.list();
for(int i=0; i<s.length; i++)
- delTree(new File(f.getPath() + File.separatorChar + s[i]));
+ delTree(new java.io.File(f.getPath() + java.io.File.separatorChar + s[i]));
}
f.delete();
}
}
f.delete();
}
@@
-49,9
+49,9
@@
public class LocalStorage {
cacheDir.mkdirs();
}
cacheDir.mkdirs();
}
- public static File getCacheFileForKey(String key) {
+ public static java.io.File getCacheFileForKey(String key) {
// FEATURE: be smarter here
// FEATURE: be smarter here
- return new File(cacheDir.getPath() + File.separatorChar + new String(Base64.encode(key.getBytes())));
+ return new java.io.File(cacheDir.getPath() + File.separatorChar + new String(Base64.encode(key.getBytes())));
}
}
}
}