zjsxwc
2020-10-12 08:34:22 +08:00
This is a stupid (but extremely fast) directory content manager. It
doesn't do a whole lot, but what it _does_ do is track directory
contents efficiently.
There are two object abstractions: the "object database", and the
"current directory cache".
The Object Database (SHA1_FILE_DIRECTORY)
The object database is literally just a content-addressable collection
of objects. All objects are named by their content, which is
approximated by the SHA1 hash of the object itself. Objects may refer
to other objects (by referencing their SHA1 hash), and so you can build
up a hierarchy of objects.