diff --git a/doc/src/02000-store.md b/doc/src/02000-store.md index 9c3dd943..301ce304 100644 --- a/doc/src/02000-store.md +++ b/doc/src/02000-store.md @@ -88,7 +88,7 @@ This is an example text, written by the user. The "Entries" are stored as files in the "Store", which is a directory the user has access to. The store may exist in the users Home-directory or any -other directory the user has read-write-Access to. +other directory the user has read-write-access to. Each module stores its data in an own subdirectory in the store. This is because we like to keep things ordered and clean, not because it is technically @@ -100,54 +100,23 @@ So if the store exists in `/home/user/store/`, a file with the storepath `/example.file` is (on the filesystem) located at `/home/user/store/example.file`. -A storepath contains predefined parts: +By convention, each `libimagentry` and `libimag` module stores its +entries in in `///~ +/// ``` -So if a module named "example-module" with version "0.1.0" stores a file in the -Store, the storepath for a file with the name "example" is -"/example-module/example~0.1.0". - Any number of subdirectories may be used, so creating folder hierarchies is -possible and valid. A file "example" for a module "module" in version "0.1.0" +possible and valid. A file "example" for a module "module" would be stored in sub-folders like this: ``` -/module/some/sub/folder/example~0.1.0 +/module/some/sub/folder/example ``` -For example, it is valid if these files exist at the same time: - -* /foo/bar~0.2 -* /foo/bar~1.3 - -It might not be sane, though. - -To future-proof the system it is necessary to provide a way for modules to -differentiate in their versions on the store level. Thus if a module wants to -retrieve a file from the store it must at least accept files from it's current -advertised version. It may accept older files and it may transform them and -resubmit them in the newer version. - -## Store path links {#sec:thestore:links} - -Linking entries is version independent. - -This means if an entry "a" from a module "A" gets written to the store, it may -link to an entry "b" from a module "B", which is in version "0.1.0" at the -moment. If the module "B" gets updated, it might update its entries in the store -as well. The link from the "a" should never get invalid in this case, though it -is not ensured by the core of imag itself. - ## Backends {#sec:thestore:backends} The store itself also has a backend. This backend is the "filesystem