mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
reword file system objects
- use singular for the "class" - more consistency in type definition - minor fixes in wording
This commit is contained in:
parent
e5e48593c8
commit
90fc5b41a8
1 changed files with 16 additions and 24 deletions
|
@ -1,40 +1,32 @@
|
||||||
# Store Objects
|
# Store Object
|
||||||
|
|
||||||
Data in Nix is chiefly organized into *store objects*.
|
Nix organizes the data it manages into *store objects*.
|
||||||
A store object is the pair of
|
A store object is the pair of
|
||||||
|
|
||||||
- A (root) file system object
|
- a [file system object](#file-system-object)
|
||||||
- A set of references to store objects
|
- a set of [references](#reference) to store objects.
|
||||||
|
|
||||||
## File system objects
|
## File system object {#file-system-object}
|
||||||
|
|
||||||
The Nix store uses a simple filesystem model.
|
The Nix store uses a simple file system model.
|
||||||
|
|
||||||
data FileSystemObject
|
data FileSystemObject
|
||||||
= Regular Executable ByteString
|
= File Executable Data
|
||||||
| Directory (Map FileName FSO)
|
| Directory (Map FileName FileSystemObject)
|
||||||
| SymLink ByteString
|
| SymLink Path
|
||||||
|
|
||||||
data Executable
|
|
||||||
= Executable
|
|
||||||
| NonExecutable
|
|
||||||
|
|
||||||
In particular, every file system object falls into these three cases:
|
|
||||||
|
|
||||||
|
Every file system object is one of the following:
|
||||||
- File: an executable flag, and arbitrary data
|
- File: an executable flag, and arbitrary data
|
||||||
|
- Directory: mapping of names to child file system objects
|
||||||
|
- [Symbolic link](https://en.m.wikipedia.org/wiki/Symbolic_link): may point anywhere.
|
||||||
|
|
||||||
- Directory: mapping of names to child file system objects.
|
In particular, symlinks pointing outside of their own root file system object, or to a store object without a matching reference, are allowed, but might not function as intended.
|
||||||
|
|
||||||
- Symlink: may point anywhere.
|
A bare file or symlink can be a root file system object.
|
||||||
|
|
||||||
In particular, symlinks that do not point within the containing root file system object or that of another store object referenced by the containing store object are allowed, but might not function as intended.
|
## Reference {#reference}
|
||||||
|
|
||||||
A bare file or symlink as the "root" file system object is allowed.
|
A store object can refer to both other store objects and itself.
|
||||||
|
|
||||||
|
|
||||||
## References
|
|
||||||
|
|
||||||
Store objects can refer to both other store objects and themselves.
|
|
||||||
|
|
||||||
Self-reference may seem pointless, but tracking them is in fact useful.
|
Self-reference may seem pointless, but tracking them is in fact useful.
|
||||||
We can best explain why later after more concepts have been established.
|
We can best explain why later after more concepts have been established.
|
||||||
|
|
Loading…
Reference in a new issue