Liking cljdoc? Tell your friends :D

repling.clj-agent.tool


*rg-command*clj

Shell command used for ripgrep lookups.

Shell command used for ripgrep lookups.
raw docstring

file-editclj

(file-edit path find replace)
(file-edit path
           find
           replace
           {:keys [replace-all? charset] :or {charset "UTF-8"}})

Edits a file via simple string replacement.

Supported forms:

  • [path find replace]
  • [path find replace opts]

opts accepts:

  • :replace-all? - when truthy, replaces every occurrence instead of only the first
  • :charset - Java charset name, defaults to "UTF-8"
Edits a file via simple string replacement.

Supported forms:
- `[path find replace]`
- `[path find replace opts]`

`opts` accepts:
- `:replace-all?` - when truthy, replaces every occurrence instead of only the
  first
- `:charset` - Java charset name, defaults to `"UTF-8"`
raw docstring

file-readclj

(file-read path)
(file-read path charset)

Reads a text file.

Supported forms:

  • [path] uses UTF-8
  • [path charset]

charset must be a valid Java charset name.

Reads a text file.

Supported forms:
- `[path]` uses UTF-8
- `[path charset]`

`charset` must be a valid Java charset name.
raw docstring

file-writeclj

(file-write path content)
(file-write path content {:keys [append? charset] :or {charset "UTF-8"}})

Writes a text file, creating parent directories when needed.

Supported forms:

  • [path content]
  • [path content opts]

opts accepts:

  • :append? - when truthy, appends instead of truncating the file
  • :charset - Java charset name, defaults to "UTF-8"
Writes a text file, creating parent directories when needed.

Supported forms:
- `[path content]`
- `[path content opts]`

`opts` accepts:
- `:append?` - when truthy, appends instead of truncating the file
- `:charset` - Java charset name, defaults to `"UTF-8"`
raw docstring

files-globclj

(files-glob path pattern)

Lists files under a path that match a glob pattern.

path may point to a directory to search recursively or to a single file. pattern must be a non-empty Java glob expression.

Returns a map with :matches as the vector of matched file paths.

Lists files under a path that match a glob pattern.

`path` may point to a directory to search recursively or to a single file.
`pattern` must be a non-empty Java glob expression.

Returns a map with `:matches` as the vector of matched file paths.
raw docstring

files-grepclj

(files-grep path pattern)
(files-grep path pattern glob-pattern)
(files-grep path pattern glob-pattern ignore-case?)

Searches file contents with ripgrep when available, otherwise with Java.

Supported forms:

  • [path pattern]
  • [path pattern glob-pattern]
  • [path pattern glob-pattern ignore-case?]

glob-pattern narrows which files are searched. ignore-case? toggles case-insensitive matching.

Searches file contents with ripgrep when available, otherwise with Java.

Supported forms:
- `[path pattern]`
- `[path pattern glob-pattern]`
- `[path pattern glob-pattern ignore-case?]`

`glob-pattern` narrows which files are searched. `ignore-case?` toggles
case-insensitive matching.
raw 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