(doseq-cmd-fn! cmd-instance f param-seq)
Repeatedly executes function f
for each entry in param-seq
. The function is passed the cmd-instance
as first
arg and a single param-seq
entry as second arg. If param-seq isn't sequential? it's wrapped into a vector.
Returns given cmd-instance
.
Example that executes .addFilepattern
on a JGit AddCommand instance for each given file, nicely threaded:
(-> (.add repo) (doseq-cmd-fn! #(.addFilepattern ^AddCommand %1 %2) ["file1.txt" "file2.txt"]) (.call))
Repeatedly executes function `f` for each entry in `param-seq`. The function is passed the `cmd-instance` as first arg and a single `param-seq` entry as second arg. If param-seq isn't sequential? it's wrapped into a vector. Returns given `cmd-instance`. Example that executes `.addFilepattern` on a JGit AddCommand instance for each given file, nicely threaded: (-> (.add repo) (doseq-cmd-fn! #(.addFilepattern ^AddCommand %1 %2) ["file1.txt" "file2.txt"]) (.call))
(doseq-obj-fn! cmd-instance type f args)
(name-from-uri uri)
Given a URI to a Git resource, derive the name (for use in cloning to a directory)
Given a URI to a Git resource, derive the name (for use in cloning to a directory)
(normalize-path path)
Removes a leading slash from a path
Removes a leading slash from a path
(person-ident person)
(recursive-delete-file f & [silently])
Delete file f. If f is a directory, recursively deletes all files and directories within the directory. Raises an
exception if it fails, unless silently
is true.
Delete file f. If f is a directory, recursively deletes all files and directories within the directory. Raises an exception if it fails, unless `silently` is true.
(seq?! obj)
If given obj
isn't sequential? returns a vec with obj
as single element, else just returns it's input.
If given `obj` isn't sequential? returns a vec with `obj` as single element, else just returns it's input.
(when-present obj & body)
Special when
macro for checking if an attribute isn't available or is an empty string
Special `when` macro for checking if an attribute isn't available or is an empty string
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close