PublicShow sourcestorage.pl -- Store files on behalve of web clients

The file store needs to deal with versioning and meta-data. This is achieved using gitty.pl, a git-like content-base store that lacks git's notion of a tree. I.e., all files are considered individual and have their own version.

Source storage_file(?File) is nondet
Source storage_file_extension(?File, ?Extension) is nondet
Source storage_file_extension_head(?File, ?Extension, -Head) is nondet
Source storage_file(+File, -Data, -Meta) is semidet
Source storage_meta_data(+File, -Meta) is semidet
True if File is known in the store.
Arguments:
Data- is a string holding the content of the file
Meta- is a dict holding the meta data about the file.
Source storage_commit(+Hash, -Meta) is semidet
Load the commit data for Hash. This version does not tell us whether Hash is the HEAD or not.
Source storage_meta_property(+Meta, -Property)
True when Meta has Property. Defined properties are:
peer(Atom)
Peer address that last saved the file -
Source storage_store_term(+Term, -Hash) is det
Source storage_load_term(+Hash, -Term) is det
Add/retrieve terms from the gitty store. This is used to create permanent links to arbitrary objects.
Source use_gitty_file(+File) is det
Source use_gitty_file(+File, +Options) is det
Load a file from the Gitty store. Options are passed to load_files/2. Additional options are:
watch(+Boolean)
If true (default), reload the file if the user saves it.
Source storage_fsck
Enumerate and check the consistency of the entire store.
Source storage_repack is det
Source storage_repack(+Options) is det
Repack the storage directory. Currently only supports the files driver. For database drivers this is supposed to be handled by the database.
Source storage_unpack
Unpack all packed objects of the store. Currently only supports the files driver. For database drivers this is supposed to be handled by the database.
Source swish_search:typeahead(+Set, +Query, -Match, +Options) is nondet[multifile]
Find files using typeahead from the SWISH search box. This version defines the following sets:
To be done
- caching?
- We should only demand public on public servers.

Re-exported predicates

The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.

Source storage_file(?File) is nondet
Source storage_file_extension(?File, ?Extension) is nondet
Source storage_file_extension_head(?File, ?Extension, -Head) is nondet
Source storage_file(+File, -Data, -Meta) is semidet
Source storage_meta_data(+File, -Meta) is semidet
True if File is known in the store.
Arguments:
Data- is a string holding the content of the file
Meta- is a dict holding the meta data about the file.
Source storage_file(?File) is nondet
Source storage_file_extension(?File, ?Extension) is nondet
Source storage_file_extension_head(?File, ?Extension, -Head) is nondet
Source storage_file(+File, -Data, -Meta) is semidet
Source storage_meta_data(+File, -Meta) is semidet
True if File is known in the store.
Arguments:
Data- is a string holding the content of the file
Meta- is a dict holding the meta data about the file.
Source storage_file(?File) is nondet
Source storage_file_extension(?File, ?Extension) is nondet
Source storage_file_extension_head(?File, ?Extension, -Head) is nondet
Source storage_file(+File, -Data, -Meta) is semidet
Source storage_meta_data(+File, -Meta) is semidet
True if File is known in the store.
Arguments:
Data- is a string holding the content of the file
Meta- is a dict holding the meta data about the file.
Source storage_file(?File) is nondet
Source storage_file_extension(?File, ?Extension) is nondet
Source storage_file_extension_head(?File, ?Extension, -Head) is nondet
Source storage_file(+File, -Data, -Meta) is semidet
Source storage_meta_data(+File, -Meta) is semidet
True if File is known in the store.
Arguments:
Data- is a string holding the content of the file
Meta- is a dict holding the meta data about the file.
Source use_gitty_file(+File) is det
Source use_gitty_file(+File, +Options) is det
Load a file from the Gitty store. Options are passed to load_files/2. Additional options are:
watch(+Boolean)
If true (default), reload the file if the user saves it.
Source storage_store_term(+Term, -Hash) is det
Source storage_load_term(+Hash, -Term) is det
Add/retrieve terms from the gitty store. This is used to create permanent links to arbitrary objects.
Source storage_repack is det
Source storage_repack(+Options) is det
Repack the storage directory. Currently only supports the files driver. For database drivers this is supposed to be handled by the database.