211 public abstract long getSpace(File f, int t);
212
213 /* -- Basic infrastructure -- */
214
215 /**
216 * Compare two abstract pathnames lexicographically.
217 */
218 public abstract int compare(File f1, File f2);
219
220 /**
221 * Compute the hash code of an abstract pathname.
222 */
223 public abstract int hashCode(File f);
224
225 // Flags for enabling/disabling performance optimizations for file
226 // name canonicalization
227 static boolean useCanonCaches = true;
228 static boolean useCanonPrefixCache = true;
229
230 private static boolean getBooleanProperty(String prop, boolean defaultVal) {
231 String val = System.getProperty(prop);
232 if (val == null) return defaultVal;
233 if (val.equalsIgnoreCase("true")) {
234 return true;
235 } else {
236 return false;
237 }
238 }
239
240 static {
241 useCanonCaches = getBooleanProperty("sun.io.useCanonCaches",
242 useCanonCaches);
243 useCanonPrefixCache = getBooleanProperty("sun.io.useCanonPrefixCache",
244 useCanonPrefixCache);
245 }
246 }
|
211 public abstract long getSpace(File f, int t);
212
213 /* -- Basic infrastructure -- */
214
215 /**
216 * Compare two abstract pathnames lexicographically.
217 */
218 public abstract int compare(File f1, File f2);
219
220 /**
221 * Compute the hash code of an abstract pathname.
222 */
223 public abstract int hashCode(File f);
224
225 // Flags for enabling/disabling performance optimizations for file
226 // name canonicalization
227 static boolean useCanonCaches = true;
228 static boolean useCanonPrefixCache = true;
229
230 private static boolean getBooleanProperty(String prop, boolean defaultVal) {
231 return Boolean.parseBoolean(System.getProperty(prop,
232 String.valueOf(defaultVal)));
233 }
234
235 static {
236 useCanonCaches = getBooleanProperty("sun.io.useCanonCaches",
237 useCanonCaches);
238 useCanonPrefixCache = getBooleanProperty("sun.io.useCanonPrefixCache",
239 useCanonPrefixCache);
240 }
241 }
|