(connect-fs-store
path
&
{:keys [detect-old-file-schema? ephemeral? config filesystem]
:or {detect-old-file-schema? false
ephemeral? (fn [path]
(some (fn* [p1__34830#]
(re-matches p1__34830#
(-> path .getFileName .toString)))
[#"\.nfs.*"]))
filesystem nil}
:as params})Create Filestore in given path. Optional serializer, read-handlers, write-handlers, buffer-size and config (for fsync) can be changed.
The :filesystem option allows using a custom java.nio.file.FileSystem (e.g., Jimfs for testing). When provided, all path operations will use that filesystem instead of the default.
Defaults are {:base path :serializer fressian-serializer :read-handlers empty :write-handlers empty :buffer-size 1 MB :filesystem nil (uses default filesystem) :config config}
Create Filestore in given path.
Optional serializer, read-handlers, write-handlers, buffer-size and config (for fsync) can be changed.
The :filesystem option allows using a custom java.nio.file.FileSystem (e.g., Jimfs for testing).
When provided, all path operations will use that filesystem instead of the default.
Defaults are
{:base path
:serializer fressian-serializer
:read-handlers empty
:write-handlers empty
:buffer-size 1 MB
:filesystem nil (uses default filesystem)
:config config} (count-konserve-keys dir)(count-konserve-keys filesystem dir)Counts konserve files in the directory.
Counts konserve files in the directory.
(delete-store base)(delete-store filesystem base)Permanently deletes the base of the store with all files.
Permanently deletes the base of the store with all files.
(detect-old-file-schema base)(detect-old-file-schema filesystem base)Detect files using old storage schema for migration.
Detect files using old storage schema for migration.
(list-files directory)(list-files directory ephemeral?)(list-files filesystem directory ephemeral?)Lists all files on the first level of a directory.
Lists all files on the first level of a directory.
(migrate-old-files {:keys [base] :as backing}
old-store-key
serializer
read-handlers
write-handlers
{:keys [sync?] :as env})(store-exists? base)(store-exists? filesystem base)Checks if path exists.
Checks if path exists.
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 |