312 * |
312 * |
313 * <p> When the syntax is "{@code glob}" then the {@code String} |
313 * <p> When the syntax is "{@code glob}" then the {@code String} |
314 * representation of the path is matched using a limited pattern language |
314 * representation of the path is matched using a limited pattern language |
315 * that resembles regular expressions but with a simpler syntax. For example: |
315 * that resembles regular expressions but with a simpler syntax. For example: |
316 * |
316 * |
317 * <blockquote> |
317 * <table class="striped" style="text-align:left; margin-left:2em"> |
318 * <table class="borderless"> |
|
319 * <caption style="display:none">Pattern Language</caption> |
318 * <caption style="display:none">Pattern Language</caption> |
|
319 * <thead> |
|
320 * <tr> |
|
321 * <th scope="col">Example |
|
322 * <th scope="col">Description |
|
323 * </tr> |
|
324 * </thead> |
320 * <tbody> |
325 * <tbody> |
321 * <tr> |
326 * <tr> |
322 * <td>{@code *.java}</td> |
327 * <th scope="row">{@code *.java}</th> |
323 * <td>Matches a path that represents a file name ending in {@code .java}</td> |
328 * <td>Matches a path that represents a file name ending in {@code .java}</td> |
324 * </tr> |
329 * </tr> |
325 * <tr> |
330 * <tr> |
326 * <td>{@code *.*}</td> |
331 * <th scope="row">{@code *.*}</th> |
327 * <td>Matches file names containing a dot</td> |
332 * <td>Matches file names containing a dot</td> |
328 * </tr> |
333 * </tr> |
329 * <tr> |
334 * <tr> |
330 * <td>{@code *.{java,class}}</td> |
335 * <th scope="row">{@code *.{java,class}}</th> |
331 * <td>Matches file names ending with {@code .java} or {@code .class}</td> |
336 * <td>Matches file names ending with {@code .java} or {@code .class}</td> |
332 * </tr> |
337 * </tr> |
333 * <tr> |
338 * <tr> |
334 * <td>{@code foo.?}</td> |
339 * <th scope="row">{@code foo.?}</th> |
335 * <td>Matches file names starting with {@code foo.} and a single |
340 * <td>Matches file names starting with {@code foo.} and a single |
336 * character extension</td> |
341 * character extension</td> |
337 * </tr> |
342 * </tr> |
338 * <tr> |
343 * <tr> |
339 * <td><code>/home/*/*</code> |
344 * <th scope="row"><code>/home/*/*</code> |
340 * <td>Matches <code>/home/gus/data</code> on UNIX platforms</td> |
345 * <td>Matches <code>/home/gus/data</code> on UNIX platforms</td> |
341 * </tr> |
346 * </tr> |
342 * <tr> |
347 * <tr> |
343 * <td><code>/home/**</code> |
348 * <th scope="row"><code>/home/**</code> |
344 * <td>Matches <code>/home/gus</code> and |
349 * <td>Matches <code>/home/gus</code> and |
345 * <code>/home/gus/data</code> on UNIX platforms</td> |
350 * <code>/home/gus/data</code> on UNIX platforms</td> |
346 * </tr> |
351 * </tr> |
347 * <tr> |
352 * <tr> |
348 * <td><code>C:\\*</code> |
353 * <th scope="row"><code>C:\\*</code> |
349 * <td>Matches <code>C:\foo</code> and <code>C:\bar</code> on the Windows |
354 * <td>Matches <code>C:\foo</code> and <code>C:\bar</code> on the Windows |
350 * platform (note that the backslash is escaped; as a string literal in the |
355 * platform (note that the backslash is escaped; as a string literal in the |
351 * Java Language the pattern would be <code>"C:\\\\*"</code>) </td> |
356 * Java Language the pattern would be <code>"C:\\\\*"</code>) </td> |
352 * </tr> |
357 * </tr> |
353 * </tbody> |
358 * </tbody> |
354 * </table> |
359 * </table> |
355 * </blockquote> |
|
356 * |
360 * |
357 * <p> The following rules are used to interpret glob patterns: |
361 * <p> The following rules are used to interpret glob patterns: |
358 * |
362 * |
359 * <ul> |
363 * <ul> |
360 * <li><p> The {@code *} character matches zero or more {@link Character |
364 * <li><p> The {@code *} character matches zero or more {@link Character |