Lines Matching defs:path

31  * A parser of Windows path strings
43 private final String path;
45 Result(WindowsPathType type, String root, String path) {
48 this.path = path;
52 * The path type
66 * The normalized path (includes root)
68 String path() {
69 return path;
74 * Parses the given input as a Windows path
81 * Parses the given input as a Windows path where it is known that the
82 * path is already normalized.
89 * Parses the given input as a Windows path.
92 * Indicates if the path requires to be normalized
113 throw new InvalidPathException(input, "UNC path is missing hostname");
118 throw new InvalidPathException(input, "UNC path is missing sharename");
160 * Remove redundant slashes from the rest of the path, forcing all slashes
163 private static String normalize(StringBuilder sb, String path, int off) {
164 int len = path.length();
165 off = nextNonSlash(path, off, len);
169 char c = path.charAt(off);
172 throw new InvalidPathException(path,
175 sb.append(path, start, off);
176 off = nextNonSlash(path, off, len);
177 if (off != len) //no slash at the end of normalized path
182 throw new InvalidPathException(path,
191 throw new InvalidPathException(path,
194 sb.append(path, start, off);
203 private static final int nextNonSlash(String path, int off, int end) {
204 while (off < end && isSlash(path.charAt(off))) { off++; }
208 private static final int nextSlash(String path, int off, int end) {
210 while (off < end && !isSlash(c=path.charAt(off))) {
212 throw new InvalidPathException(path,
213 "Illegal character [" + c + "] in path",
224 // Reserved characters for window path name