Liking cljdoc? Tell your friends :D

apollo-test.changes

Two-stage file change detection: mtime check first, then SHA-256 hash. Implements the TwoStageChangeDetection rule.

Two-stage file change detection: mtime check first, then SHA-256 hash.
Implements the TwoStageChangeDetection rule.
raw docstring

detect-changesclj

(detect-changes cache files)

Given a RunCache and a seq of discovered file maps {:path :ns-sym}, classifies each file and returns: {:changed [file-maps...] ;; mtime AND hash differ :unchanged [file-maps...] ;; mtime same, or mtime differs but hash same :new [file-maps...] ;; not in cache :updated-entries {path -> entry}} ;; only the entries map, no other cache keys

The updated-entries map includes:

  • mtime updates for files where mtime changed but hash is identical
  • new entries for :changed files (with new mtime + hash)
  • new entries for :new files (with mtime + hash)
  • unchanged entries preserved as-is Callers are responsible for assembling the full cache map from these entries.
Given a RunCache and a seq of discovered file maps {:path :ns-sym},
classifies each file and returns:
  {:changed   [file-maps...]   ;; mtime AND hash differ
   :unchanged [file-maps...]   ;; mtime same, or mtime differs but hash same
   :new       [file-maps...]   ;; not in cache
   :updated-entries {path -> entry}}  ;; only the entries map, no other cache keys

The updated-entries map includes:
- mtime updates for files where mtime changed but hash is identical
- new entries for :changed files (with new mtime + hash)
- new entries for :new files (with mtime + hash)
- unchanged entries preserved as-is
Callers are responsible for assembling the full cache map from these entries.
raw docstring

file-hashclj

(file-hash path)

Computes the SHA-256 hash of the file contents at the given path. Returns a lowercase hex string.

Computes the SHA-256 hash of the file contents at the given path.
Returns a lowercase hex string.
raw docstring

file-mtimeclj

(file-mtime path)

Returns the last-modified time (in millis) of the file at the given path.

Returns the last-modified time (in millis) of the file at the given path.
raw docstring

reconcile-deletedclj

(reconcile-deleted cache)

Removes cache entries for files that no longer exist on disk. Implements DeletedFileHandling rule: silently removes entries, no warning or error emitted. Returns the updated cache.

Removes cache entries for files that no longer exist on disk.
Implements DeletedFileHandling rule: silently removes entries,
no warning or error emitted. Returns the updated cache.
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