< prev index next >

src/java.base/share/classes/java/nio/file/FileSystem.java

Print this page

        

*** 312,360 **** * * <p> When the syntax is "{@code glob}" then the {@code String} * representation of the path is matched using a limited pattern language * that resembles regular expressions but with a simpler syntax. For example: * ! * <blockquote> ! * <table class="borderless"> * <caption style="display:none">Pattern Language</caption> * <tbody> * <tr> ! * <td>{@code *.java}</td> * <td>Matches a path that represents a file name ending in {@code .java}</td> * </tr> * <tr> ! * <td>{@code *.*}</td> * <td>Matches file names containing a dot</td> * </tr> * <tr> ! * <td>{@code *.{java,class}}</td> * <td>Matches file names ending with {@code .java} or {@code .class}</td> * </tr> * <tr> ! * <td>{@code foo.?}</td> * <td>Matches file names starting with {@code foo.} and a single * character extension</td> * </tr> * <tr> ! * <td><code>/home/*/*</code> * <td>Matches <code>/home/gus/data</code> on UNIX platforms</td> * </tr> * <tr> ! * <td><code>/home/**</code> * <td>Matches <code>/home/gus</code> and * <code>/home/gus/data</code> on UNIX platforms</td> * </tr> * <tr> ! * <td><code>C:\\*</code> * <td>Matches <code>C:\foo</code> and <code>C:\bar</code> on the Windows * platform (note that the backslash is escaped; as a string literal in the * Java Language the pattern would be <code>"C:\\\\*"</code>) </td> * </tr> * </tbody> * </table> - * </blockquote> * * <p> The following rules are used to interpret glob patterns: * * <ul> * <li><p> The {@code *} character matches zero or more {@link Character --- 312,364 ---- * * <p> When the syntax is "{@code glob}" then the {@code String} * representation of the path is matched using a limited pattern language * that resembles regular expressions but with a simpler syntax. For example: * ! * <table class="striped" style="text-align:left; margin-left:2em"> * <caption style="display:none">Pattern Language</caption> + * <thead> + * <tr> + * <th scope="col">Example + * <th scope="col">Description + * </tr> + * </thead> * <tbody> * <tr> ! * <th scope="row">{@code *.java}</th> * <td>Matches a path that represents a file name ending in {@code .java}</td> * </tr> * <tr> ! * <th scope="row">{@code *.*}</th> * <td>Matches file names containing a dot</td> * </tr> * <tr> ! * <th scope="row">{@code *.{java,class}}</th> * <td>Matches file names ending with {@code .java} or {@code .class}</td> * </tr> * <tr> ! * <th scope="row">{@code foo.?}</th> * <td>Matches file names starting with {@code foo.} and a single * character extension</td> * </tr> * <tr> ! * <th scope="row"><code>/home/*/*</code> * <td>Matches <code>/home/gus/data</code> on UNIX platforms</td> * </tr> * <tr> ! * <th scope="row"><code>/home/**</code> * <td>Matches <code>/home/gus</code> and * <code>/home/gus/data</code> on UNIX platforms</td> * </tr> * <tr> ! * <th scope="row"><code>C:\\*</code> * <td>Matches <code>C:\foo</code> and <code>C:\bar</code> on the Windows * platform (note that the backslash is escaped; as a string literal in the * Java Language the pattern would be <code>"C:\\\\*"</code>) </td> * </tr> * </tbody> * </table> * * <p> The following rules are used to interpret glob patterns: * * <ul> * <li><p> The {@code *} character matches zero or more {@link Character
< prev index next >