Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.paths

Cross-platform path helpers. A LEAF namespace (no project deps) so any layer — core, extensions, tests — can normalize without a require cycle.

Cross-platform path helpers. A LEAF namespace (no project deps) so any
layer — core, extensions, tests — can normalize without a require cycle.
raw docstring

abbreviate-homeclj

(abbreviate-home path)
(abbreviate-home path home)

Shorten an absolute path for DISPLAY by replacing the user's home dir with ~, matching the footer/navigator/dialogs. Only rewrites when path is at or under home (so /etc/x and relative paths stay unchanged). Rendered descendants always use / separators; nil-safe.

Shorten an absolute path for DISPLAY by replacing the user's home dir with
`~`, matching the footer/navigator/dialogs. Only rewrites when `path` is at
or under home (so `/etc/x` and relative paths stay unchanged). Rendered
descendants always use `/` separators; nil-safe.
sourceraw docstring

ensure-logs-dir!clj

(ensure-logs-dir!)

Create ~/.vis/logs (and parents) when absent; return its path string. Never throws.

Create `~/.vis/logs` (and parents) when absent; return its path string.
Never throws.
sourceraw docstring

expand-homeclj

(expand-home path)
(expand-home path home)

Expand a leading ~ path segment to the user's home directory for filesystem I/O. Bare ~ becomes home; ~/… and ~\… use native separators; ~user, mid-path tildes, and ordinary paths pass through unchanged. Nil-safe and a no-op when home is unavailable.

Expand a leading `~` path segment to the user's home directory for filesystem
I/O. Bare `~` becomes home; `~/…` and `~\…` use native separators; `~user`,
mid-path tildes, and ordinary paths pass through unchanged. Nil-safe and a
no-op when home is unavailable.
sourceraw docstring

logs-dirclj

(logs-dir)

Directory for vis diagnostic logs — ~/.vis/logs. A DEDICATED subdir (not ~/.vis itself) so the native file tools and the Python sandbox can be granted always-on access to logs without exposing config.edn, the session DB, or gateway tokens. Returns the path string (native separators are fine for real I/O).

Directory for vis diagnostic logs — `~/.vis/logs`. A DEDICATED subdir (not
`~/.vis` itself) so the native file tools and the Python sandbox can be
granted always-on access to logs without exposing `config.edn`, the session
DB, or gateway tokens. Returns the path string (native separators are fine
for real I/O).
sourceraw docstring

unixifyclj

(unixify s)

Normalize a path string to / separators on every OS. Java's File/Path APIs yield \ on Windows, and there is no stdlib/fs call that hands back a /-string there — so this is the single canonical normalizer.

Use it ONLY where a path is DATA: compared, glob-matched, shown to the model, or embedded in a URL / wire / DB. NEVER for real filesystem I/O — io/file, .exists, JGit, nio all take native paths fine. Returns nil for nil input.

Normalize a path string to `/` separators on every OS. Java's `File`/`Path`
APIs yield `\` on Windows, and there is no stdlib/`fs` call that hands back
a `/`-string there — so this is the single canonical normalizer.

Use it ONLY where a path is DATA: compared, glob-matched, shown to the model,
or embedded in a URL / wire / DB. NEVER for real filesystem I/O — `io/file`,
`.exists`, JGit, nio all take native paths fine. Returns nil for nil input.
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