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.
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.
(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.
(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).
(with-dir dir & body)Push directory into current directory context for execution of body.
Push directory into current directory context for execution of body.
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 |