equal
deleted
inserted
replaced
96 if (prevChar == '/') return normalize(pathname, n, n - 1); |
96 if (prevChar == '/') return normalize(pathname, n, n - 1); |
97 return pathname; |
97 return pathname; |
98 } |
98 } |
99 |
99 |
100 public int prefixLength(String pathname) { |
100 public int prefixLength(String pathname) { |
101 if (pathname.length() == 0) return 0; |
101 if (pathname.isEmpty()) return 0; |
102 return (pathname.charAt(0) == '/') ? 1 : 0; |
102 return (pathname.charAt(0) == '/') ? 1 : 0; |
103 } |
103 } |
104 |
104 |
105 public String resolve(String parent, String child) { |
105 public String resolve(String parent, String child) { |
106 if (child.isEmpty()) return parent; |
106 if (child.isEmpty()) return parent; |
247 public native int getBooleanAttributes0(File f); |
247 public native int getBooleanAttributes0(File f); |
248 |
248 |
249 public int getBooleanAttributes(File f) { |
249 public int getBooleanAttributes(File f) { |
250 int rv = getBooleanAttributes0(f); |
250 int rv = getBooleanAttributes0(f); |
251 String name = f.getName(); |
251 String name = f.getName(); |
252 boolean hidden = (name.length() > 0) && (name.charAt(0) == '.'); |
252 boolean hidden = !name.isEmpty() && name.charAt(0) == '.'; |
253 return rv | (hidden ? BA_HIDDEN : 0); |
253 return rv | (hidden ? BA_HIDDEN : 0); |
254 } |
254 } |
255 |
255 |
256 public native boolean checkAccess(File f, int access); |
256 public native boolean checkAccess(File f, int access); |
257 public native long getLastModifiedTime(File f); |
257 public native long getLastModifiedTime(File f); |