(add-content! content-store-id {:storage/keys [provider] :as element})
Writes the content to the storage directory returning the new provider source.
Writes the content to the storage directory returning the new provider source.
(compatible? id)
(content-file content-store-id {:address/keys [id] :as addr})
Returns the file in the content directory which matches the address of the provider or nil if it does not exist in the store.
NOTE: This is wildly inefficient and will fall down hard with large numbers of files. Need an index-based solution to scale.
Returns the file in the content directory which matches the address of the provider or nil if it does not exist in the store. NOTE: This is wildly inefficient and will fall down hard with large numbers of files. Need an index-based solution to scale.
(element-source content-store-id
{:storage/keys [provider block address] :as element})
Returns a source from a storage asset which has an address that exists in this content store.
Heuristic:
Checks the provider or block for a source from this content store returning it
Constructs a source using the address from the asset in this order: a. a storage/address b. the block address c. the provider address
Note: In this case the source will have an 'unspecified' content-type
Returns a source from a storage asset which has an address that exists in this content store. Heuristic: 1. Checks the provider or block for a source from this content store returning it 2. Constructs a source using the address from the asset in this order: a. a storage/address b. the block address c. the provider address Note: In this case the source will have an 'unspecified' content-type
(id name dir)
(new id)
(provider-source content-store-id element)
Returns the source that matches the content provider for this store.
Returns the source that matches the content provider for this store.
(remove-content! content-store-id {:storage/keys [provider] :as element})
Removes the content from the file storage directory returning the source used.
Removes the content from the file storage directory returning the source used.
(source-data {:storage/keys [provider block] :as element} content-dir)
Returns a map containing the source of this provider in the store along with that sources content file in the storage directory.
Returns a map containing the source of this provider in the store along with that sources content file in the storage directory.
(store-directory content-store-id)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close