Skip to content

Commit

Permalink
Add more details about path separators and globs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexarchambault committed May 1, 2023
1 parent 0639c37 commit 078666f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,20 @@ Use it like
```scala
ClassPathUtil.classPath("/foo/${thing}/*:/a/b.jar") // Seq[java.nio.file.Path]
```

## Details

### Separator

Just like the format that `java -cp` accepts, paths are split
by an OS-dependent separator: `;` on Windows, `:` on Linux / macOS
(and other Unix systems). *class-path-util* uses the separator
returned by `java.io.File.pathSeparator`.

### Globs

`*` and `*.jar` are accepted at the end of a path. Case doesn't matter
(`*.JAR` works too, for example). Both `*` and `*.jar` are equivalent,
and make class-path-util add all the JARs (files ending in `.jar`,
comparison done in a case-insensitive way) of the underlying directory
to the class path.

0 comments on commit 078666f

Please sign in to comment.