(abs-path p)(abs-path a b)If b is a relative path, will combine it with a, otherwise
will just return b.
If `b` is a relative path, will combine it with `a`, otherwise will just return `b`.
(add-shutdown-hook! h)Executes h when the JVM shuts down. Returns the thread that will
execute the hook.
Executes `h` when the JVM shuts down. Returns the thread that will execute the hook.
(combine a b)Returns the canonical path of combining a and b
Returns the canonical path of combining `a` and `b`
(delete-dir dir)Deletes directory recursively
Deletes directory recursively
(ensure-dir-exists! f)If f is a file, ensures that the directory containing f exists.
If `f` is a file, ensures that the directory containing `f` exists.
(file-hash path)Calculates md5 hash for given file
Calculates md5 hash for given file
(fn-name x)If x points to a fn, returns its name without namespace
If x points to a fn, returns its name without namespace
(get-all-ip-addresses)Lists all non-loopback, non-virtual site local ip addresses
Lists all non-loopback, non-virtual site local ip addresses
(get-ip-addr)Determines the ip address of this VM by selecting the first of all available addresses. This could be an ipv4 or ipv6 address.
Determines the ip address of this VM by selecting the first of all available addresses. This could be an ipv4 or ipv6 address.
(inetaddr->str a)Returns textual representation of the inet address
Returns textual representation of the inet address
(load-privkey f)Load private key from file or from string
Load private key from file or from string
(log-deferred-elapsed x msg)Given a deferred, keeps track of time elapsed and logs it
Given a deferred, keeps track of time elapsed and logs it
(name->display-id n existing?)Generates a unique display id using the given name. It checks the existing?
fn to avoid collisions.
Generates a unique display id using the given name. It checks the `existing?` fn to avoid collisions.
(or-nil f)Wraps f so that when the argument is nil, it also returns nil and does not invoke f.
Wraps `f` so that when the argument is `nil`, it also returns `nil` and does not invoke `f`.
(rebase-path p from to)Given two absolute paths, recalculates p so that it becomes relative to to instead
of from.
Given two absolute paths, recalculates p so that it becomes relative to `to` instead of `from`.
(round-up x)Rounds the decimal argument up to the next integer value
Rounds the decimal argument up to the next integer value
(stack-trace ex)Prints stack trace to a string
Prints stack trace to a string
(tmp-file name)(tmp-file prefix suffix)Generates a new temporary path
Generates a new temporary path
(try-slurp x)Reads the file if it exists, or just returns x
Reads the file if it exists, or just returns x
(wait-for-file f & opts)Periodically checks if given file exists. Returns a deferred that holds the path if it exists.
Periodically checks if given file exists. Returns a deferred that holds the path if it exists.
(wait-until p & {:keys [period] :or {period 100}})Periodically invokes predicate p. Returns a deferred that realizes when p
becomes truthy. Returns the first truthy return value of p.
Periodically invokes predicate `p`. Returns a deferred that realizes when `p` becomes truthy. Returns the first truthy return value of `p`.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |