Snapshot file management.
Handles reading, writing, and organising snapshot files on disk (or alternative storage for ClojureScript).
Snapshot file management. Handles reading, writing, and organising snapshot files on disk (or alternative storage for ClojureScript).
(delete-snapshot! snapshot-key)Delete a snapshot from storage.
Delete a snapshot from storage.
(list-snapshots)List all snapshot files in the snapshot directory.
Returns a sequence of {:key keyword :path string} maps.
List all snapshot files in the snapshot directory.
Returns a sequence of {:key keyword :path string} maps.List all snapshots in localStorage.
Returns a sequence of {:key keyword :path string} maps.
List all snapshots in localStorage.
Returns a sequence of {:key keyword :path string} maps.(read-snapshot snapshot-key)Read a snapshot from storage.
Returns nil if the snapshot doesn't exist. Returns the snapshot value (with metadata stripped).
Read a snapshot from storage. Returns nil if the snapshot doesn't exist. Returns the snapshot value (with metadata stripped).
(snapshot-exists? snapshot-key)Check if a snapshot exists for the given key.
Check if a snapshot exists for the given key.
(snapshot-metadata snapshot-key)Get metadata for a snapshot without loading the full value.
Returns a map with :created-at, :platform, etc., or nil if no metadata.
Get metadata for a snapshot without loading the full value. Returns a map with :created-at, :platform, etc., or nil if no metadata.
(snapshot-path snapshot-key)Generate the file path for a snapshot key.
Examples: (snapshot-path :user-test) => "test/still/user_test.edn" (snapshot-path :api/create-user) => "test/still/api_create_user.edn"
Generate the file path for a snapshot key. Examples: (snapshot-path :user-test) => "test/still/user_test.edn" (snapshot-path :api/create-user) => "test/still/api_create_user.edn"
(update-snapshot! snapshot-key value)Update an existing snapshot or create a new one.
Returns the value that was written.
Update an existing snapshot or create a new one. Returns the value that was written.
(write-snapshot! snapshot-key value)Write a snapshot to storage.
The value will be serialised and pretty-printed. Metadata is added if configured.
Write a snapshot to storage. The value will be serialised and pretty-printed. Metadata is added if configured.
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 |