Public Vars

Back

glob (clj)

(source)

function

(glob root pattern) (glob root pattern opts)
Given a file and glob pattern, returns matches as vector of paths. Patterns containing `**` or `/` will cause a recursive walk over path, unless overriden with :recursive. Similarly: :hidden will be enabled (when not set) when `pattern` starts with a dot. Glob interpretation is done using the rules described in https://docs.oracle.com/javase/7/docs/api/java/nio/file/FileSystem.html#getPathMatcher(java.lang.String). Options: * `:hidden` - match hidden paths. Implied when `pattern` starts with a dot. Note: on Windows files starting with a dot are not hidden, unless their hidden attribute is set. * `:follow-links` - follow symlinks. * `:recursive` - force recursive search. Implied when `pattern` contains `**` or `/`. * `:max-depth` - max depth to descend into directory structure. Examples: `(fs/glob "." "**.clj")`

Examples