From 078666f3d1677ddc3e45d67182a781dddaf38bb8 Mon Sep 17 00:00:00 2001 From: Alex Archambault Date: Tue, 2 May 2023 00:25:33 +0200 Subject: [PATCH] Add more details about path separators and globs --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 7cd3a86..e04a52a 100644 --- a/README.md +++ b/README.md @@ -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.