Liking cljdoc? Tell your friends :D

clojure.tools.deps.util.dir

An abstraction for managing a 'current directory' stack. The dynamic var *the-dir* holds the current directory. Use with-dir to push a new absolute (or more usefully) relative directory onto the stack, which will pop when the scope exits. Use canonical to get the canonical File of a path in terms of the current directory context.

An abstraction for managing a 'current directory' stack.
The dynamic var `*the-dir*` holds the current directory.
Use `with-dir` to push a new absolute (or more usefully)
relative directory onto the stack, which will pop when the
scope exits. Use `canonical` to get the canonical File
of a path in terms of the current directory context.
raw docstring

*the-dir*clj

Thread-local directory context for resolving relative directories. Defaults to current directory. Should always hold an absolute directory java.io.File, never null.

Thread-local directory context for resolving relative directories.
Defaults to current directory. Should always hold an absolute directory
java.io.File, never null.
sourceraw docstring

as-canonicalclj

(as-canonical dir)
source

canonicalizeclj

(canonicalize f)

Make canonical File in terms of the current directory context. f may be either absolute or relative.

Make canonical File in terms of the current directory context.
f may be either absolute or relative.
sourceraw docstring

sub-path?clj

(sub-path? path)

True if the path is a sub-path of the current directory context. path may be either absolute or relative. Will return true if path has a parent that is the current directory context, false otherwise. Handles relative paths, .., ., etc. The sub-path does not need to exist on disk (but the current directory context must).

True if the path is a sub-path of the current directory context.
path may be either absolute or relative. Will return true if path
has a parent that is the current directory context, false otherwise.
Handles relative paths, .., ., etc. The sub-path does not need to
exist on disk (but the current directory context must).
sourceraw docstring

with-dircljmacro

(with-dir dir & body)

Push directory into current directory context for execution of body.

Push directory into current directory context for execution of body.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close