on master help sign in
ankh
commit5d6f28bc8375472b33a5c442b5d19d14b721e61a authordrbeefsupreme <drbeefsupreme@discordja.net> dateThu 25 Mar 2021, 16:41 (6 years ago) parent8fbce1b
1 file changed+36−26
arvo/clay/data-types.md+36−26
arvo/clay/data-types.md+36−26
@@ -195,12 +195,16 @@ This represents a request for all changes between `from` and `to` on `path`. You
195195will be notified when a change is made to the node referenced by the `path` or to
196196any of its children.
197197
198−### `++care:clay`, Clay submode
198+### `$care:clay`, Clay submode
199199
200200```hoon
201− ++ care ?(%u %v %w %x %y %z) :: Clay submode
201+ +$ care ?(%a %b %c %d %e %f %p %r %s %t %u %v %w %x %y %z) :: clay submode
202202```
203203
204+TODO: The rest of these. Ask Ted if there is any docs on them because a lot of
205+these (implemented with +read-X) are uncommented. Also need to check the ones
206+that are already here.
207+
204208This specifies what type of information is requested in a subscription
205209or a scry.
206210
@@ -220,10 +224,39 @@ if `q:ankh` is null), then this produces null.
220224
221225`%z` requests the `++ankh` of the specified commit at the specfied path.
222226
223−### `++arch`, shallow filesystem node
227+#### `$ankh`, filesystem node
228+
229+```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+
236++$ ankh :: expanded node
237+ $~ [~ ~]
238+ $: fil=(unit [p=lobe q=cage]) :: file
239+ dir=(map @ta ankh) :: folders
240+ == ::
241+```
242+
243+This is a single node in the filesystem. This may be file or a directory
244+or both. In Earth filesystems, a node is a file xor a directory. On
245+Mars, we're inclusive, so a node is a file ior a directory.
246+
247+`fil` is the contents of this file, if any. `p.fil` is a hash of the
248+contents while `q.fil` is the data itself.
249+
250+`dir` is the set of children of this node. In the case of a pure file,
251+this is empty. The keys are the names of the children and the values
252+are, recursively, the nodes themselves.
253+
254+
255+### `$arch`, shallow filesystem node
224256
225257```hoon
226258 ++ arch ,[p=@uvI q=(unit ,@uvI) r=(map ,@ta ,~)] :: fundamental node
259++$ arch (axil @uvI)
227260```
228261
229262This is analogous to `++ankh:clay` except that the we have neither our
@@ -290,29 +323,6 @@ behaves exactly as you would expect.
290323can only be applied to numbered commits. Labels must be unique across a
291324desk.
292325
293−#### `++ankh`, filesystem node
294−
295−```hoon
296− ++ ankh :: fs node (new)
297− $: p=cash :: recursive hash
298− q=(unit ,[p=cash q=*]) :: file
299− r=(map ,@ta ankh) :: folders
300− == ::
301−```
302−
303−This is a single node in the filesystem. This may be file or a directory
304−or both. In earth filesystems, a node is a file xor a directory. On
305−mars, we're inclusive, so a node is a file ior a directory.
306−
307−`p` is a recursive hash that depends on the contents of the this file or
308−directory and on any children.
309−
310−`q` is the contents of this file, if any. `p.q` is a hash of the
311−contents while `q.q` is the data itself.
312−
313−`r` is the set of children of this node. In the case of a pure file,
314−this is empty. The keys are the names of the children and the values
315−are, recursively, the nodes themselves.
316326
317327#### `++cash`, ankh hash
318328