Liking cljdoc? Tell your friends :D

com.blockether.fff

Clojure binding to fff — fast typo-tolerant file/content search — through fff-c's C ABI using the JDK Foreign Function & Memory API.

Clojure binding to fff — fast typo-tolerant file/content search — through
fff-c's C ABI using the JDK Foreign Function & Memory API.
raw docstring

base-pathclj

(base-path fff)
source

createclj

(create)
(create {:keys [base-path frecency-db-path history-db-path enable-mmap-cache?
                enable-content-indexing? watch? ai-mode? log-file-path log-level
                cache-budget-max-files cache-budget-max-bytes
                cache-budget-max-file-size enable-fs-root-scanning?
                enable-home-dir-scanning? follow-symlinks? respect-ignore-files?
                custom-ignore-filenames exclude-globs unignore-globs]
         :or {base-path (System/getProperty "user.dir")
              enable-mmap-cache? false
              enable-content-indexing? true
              watch? false
              ai-mode? false
              respect-ignore-files? true}})

Create and return an Fff instance. Options: :base-path (default current dir), :frecency-db-path, :history-db-path, :enable-mmap-cache?, :enable-content-indexing?, :watch?, :ai-mode?, :log-file-path, :log-level, cache budget keys, :follow-symlinks?, root/home scanning flags, and :respect-ignore-files? (default true — set false to index files excluded by .gitignore/.ignore/.git/info/exclude; .git internals stay excluded either way).

Ignore overlay (each a seq of strings, all optional):

  • :custom-ignore-filenames — extra per-directory ignore-file names to honor, e.g. [".rgignore"]. The ignore crate registers .gitignore/.ignore itself; anything else must be opted in here.
  • :exclude-globs — gitignore-syntax patterns ALWAYS excluded, whatever the ignore files say and even when :respect-ignore-files? is false.
  • :unignore-globs — gitignore-syntax patterns RE-INCLUDED although an ignore file excludes them (a whitelist; :exclude-globs still wins). No-op when :respect-ignore-files? is false. The overlay is honored by the scan walk AND by the live watcher, so a re-included subtree stays in the index.
Create and return an `Fff` instance. Options:
`:base-path` (default current dir), `:frecency-db-path`, `:history-db-path`,
`:enable-mmap-cache?`, `:enable-content-indexing?`, `:watch?`, `:ai-mode?`,
`:log-file-path`, `:log-level`, cache budget keys, `:follow-symlinks?`, root/home scanning flags,
and `:respect-ignore-files?` (default true — set false to index files excluded by
`.gitignore`/`.ignore`/`.git/info/exclude`; `.git` internals stay excluded either way).

Ignore overlay (each a seq of strings, all optional):
- `:custom-ignore-filenames` — extra per-directory ignore-file names to honor,
  e.g. `[".rgignore"]`. The `ignore` crate registers `.gitignore`/`.ignore`
  itself; anything else must be opted in here.
- `:exclude-globs` — gitignore-syntax patterns ALWAYS excluded, whatever the
  ignore files say and even when `:respect-ignore-files?` is false.
- `:unignore-globs` — gitignore-syntax patterns RE-INCLUDED although an ignore
  file excludes them (a whitelist; `:exclude-globs` still wins). No-op when
  `:respect-ignore-files?` is false.
The overlay is honored by the scan walk AND by the live watcher, so a
re-included subtree stays in the index.
sourceraw docstring

destroy!clj

(destroy! fff)
source

globclj

(glob fff
      {:keys [pattern current-file max-threads page-index page-size]
       :or {max-threads 0 page-index 0 page-size 100}})

Glob-only path search. Options: :pattern, :current-file, :max-threads, :page-index, :page-size.

Glob-only path search. Options: `:pattern`, `:current-file`, `:max-threads`, `:page-index`, `:page-size`.
sourceraw docstring

grepclj

(grep fff
      {:keys [query mode max-file-size max-matches-per-file smart-case?
              file-offset page-limit time-budget-ms before-context after-context
              classify-definitions?]
       :or {classify-definitions? false
            page-limit 50
            max-file-size 0
            smart-case? true
            after-context 0
            mode :plain
            before-context 0
            max-matches-per-file 0
            time-budget-ms 0
            file-offset 0}})

Content search. :mode is :plain (default), :regex, or :fuzzy. Other options mirror fff-c: max file size, matches/page limits, smart case, context, definition classification, file pagination, and time budget.

Content search. `:mode` is `:plain` (default), `:regex`, or `:fuzzy`.
Other options mirror fff-c: max file size, matches/page limits, smart case,
context, definition classification, file pagination, and time budget.
sourceraw docstring

health-checkclj

(health-check fff)
(health-check fff test-path)

Return fff-c's health-check JSON string. Pass nil or omit test-path to check the instance base path.

Return fff-c's health-check JSON string. Pass nil or omit `test-path` to check the instance base path.
sourceraw docstring

historical-queryclj

(historical-query fff offset)
source

refresh-git-status!clj

(refresh-git-status! fff)
source

rescan!clj

(rescan! fff)
(rescan! fff timeout-ms)

Rescan the filesystem and BLOCK until the fresh index is queryable.

Read-your-writes: after this returns true, search/grep see files and file contents written before the call. Returns false on timeout.

Rescan the filesystem and BLOCK until the fresh index is queryable.

Read-your-writes: after this returns true, `search`/`grep` see files and file
contents written before the call. Returns false on timeout.
sourceraw docstring

scan-files!clj

(scan-files! fff)

Trigger an ASYNC rescan. Fire-and-forget: the request is dropped into a pending flag while a previous scan's post-scan indexing is still running, and wait-for-scan returns before the grep content index is rebuilt. Use rescan! when the caller must see its own writes.

Trigger an ASYNC rescan. Fire-and-forget: the request is dropped into a
pending flag while a previous scan's post-scan indexing is still running, and
`wait-for-scan` returns before the grep content index is rebuilt. Use
`rescan!` when the caller must see its own writes.
sourceraw docstring

(search fff
        {:keys [query current-file max-threads page-index page-size
                combo-boost-multiplier min-combo-count]
         :or {query ""
              max-threads 0
              page-index 0
              page-size 100
              combo-boost-multiplier 100
              min-combo-count 3}})

Fuzzy path search. Options: :query, :current-file, :max-threads, :page-index, :page-size, :combo-boost-multiplier, :min-combo-count.

Fuzzy path search. Options: `:query`, `:current-file`, `:max-threads`,
`:page-index`, `:page-size`, `:combo-boost-multiplier`, `:min-combo-count`.
sourceraw docstring

track-query!clj

(track-query! fff query file-path)
source

wait-for-scanclj

(wait-for-scan fff)
(wait-for-scan fff timeout-ms)

Wait until the initial scan completes. Returns true on completion, false on timeout.

Wait until the initial scan completes. Returns true on completion, false on timeout.
sourceraw docstring

with-instancecljmacro

(with-instance [sym opts] & body)
source

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