on master help sign in
arch
commit86d7ea45ad35efc4a66c0cab92762daa3691c876 authordrbeefsupreme <drbeefsupreme@discordja.net> dateThu 8 Apr 2021, 14:01 (6 years ago) parent5d6f28b
1 file changed+15−14
arvo/clay/data-types.md+15−14
arvo/clay/data-types.md+15−14
@@ -227,12 +227,6 @@ if `q:ankh` is null), then this produces null.
227227#### `$ankh`, filesystem node
228228
229229```hoon
230− ++ ankh :: fs node (new)
231− $: p=cash :: recursive hash
232− q=(unit ,[p=cash q=*]) :: file
233− r=(map ,@ta ankh) :: folders
234− == ::
235−
236230+$ ankh :: expanded node
237231 $~ [~ ~]
238232 $: fil=(unit [p=lobe q=cage]) :: file
@@ -255,17 +249,24 @@ are, recursively, the nodes themselves.
255249### `$arch`, shallow filesystem node
256250
257251```hoon
258− ++ arch ,[p=@uvI q=(unit ,@uvI) r=(map ,@ta ,~)] :: fundamental node
259252+$ arch (axil @uvI)
253+++ axil
254+ |$ [item]
255+ [fil=(unit item) dir=(map @ta ~)]
260256```
261257
262−This is analogous to `++ankh:clay` except that the we have neither our
263−contents nor the ankhs of our children. The other fields are exactly the
264−same, so `p` is a hash of the associated ankh, `u.q`, if it exists, is a
265−hash of the contents of this node, and the keys of `r` are the names of
266−our children. `r` is a map to null rather than a set so that the
267−ordering of the map will be equivalent to that of `r:ankh`, allowing
268−efficient conversion.
258+An `arch` is a lightweight version of an `ankh` that only contains the hash
259+of the associated file and a `map` of child directories, but not the children of
260+those directories.
261+
262+The child directories are given by a `map` to null rather than a `set` so that the
263+ordering of the `map` will be the same as it is for an `axal`, allowing
264+efficient conversion for when the heavier node is needed.
265+```hoon
266+++ axal
267+ |$ [item]
268+ [fil=(unit item) dir=(map @ta $)]
269+```
269270
270271#### `++case:clay`, specifying a commit
271272