Checks if the specified string is a valid file reference. @param path path string @return result of check
(final String path)
| 459 | * @return result of check |
| 460 | */ |
| 461 | public static boolean isValid(final String path) { |
| 462 | // check if path starts with Windows drive letter |
| 463 | final int c = path.indexOf(':'); |
| 464 | return c == -1 || !Prop.WIN || c == 1 && Token.letter(path.charAt(0)) && |
| 465 | (path.indexOf('/') == 2 || path.indexOf('\\') == 2); |
| 466 | } |
| 467 | |
| 468 | /** |
| 469 | * Converts a name filter (glob) to a regular expression. |