Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions boot/core/src/boot/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@
(get-files fileset #{:input}))

(defn input-fileset
"FIXME: document"
"Get a fileset tree that contains only files with input role."
[fileset]
(tmpd/restrict-dirs fileset (input-dirs fileset)))

Expand All @@ -446,7 +446,7 @@
(get-files fileset #{:output}))

(defn output-fileset
"FIXME: document"
"Get a fileset tree that contains only files with output role."
[fileset]
(tmpd/restrict-dirs fileset (output-dirs fileset)))

Expand Down Expand Up @@ -1216,7 +1216,12 @@
#(some identity (seq-pred %)) files))

(defn file-filter
"A file filtering function factory. FIXME: more documenting here."
"A file filtering function factory. This function takes a factory
function which when called with a \"criteria\" returns a predicate
function for testing a java.io.File against that criteria. The
return value is a file filtering function which takes a list of
criteria for matching, files to be filtered and an optional negation
flag to specify whether the predicate should be inverted."
[mkpred]
(fn [criteria files & [negate?]]
(assert (seq criteria) "boot.core/file-filter requires a list of criteria but nil was passed in, make sure your `by-*` calls are passing them.")
Expand Down