Public Vars

Back

match (clj)

(source)

function

(match root pattern) (match root pattern {:keys [hidden follow-links max-depth recursive]})
Given a file and match pattern, returns matches as vector of paths. Pattern 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 - note: on Windows paths starting with a dot are not hidden, unless their hidden attribute is set. * `:follow-links` - follow symlinks. * `:recursive` - match recursively. * `:max-depth` - max depth to descend into directory structure. Examples: `(fs/match "." "regex:.*\\.clj" {:recursive true})`

Examples