@@ -4,38 +4,6 @@ weight = 7
4template = "doc.html"
4template = "doc.html"
9−- [Introduction](#introduction)
10−- [%warp](#warp) - Read and Subscribe.
11− - [%sing](#sing) - Read a file or directory.
12− - [%next](#next) - Subscribe for the next change to a file or directory.
13− - [%mult](#mult) - Subscribe for the next change to a set of files and/or directories.
14− - [%many](#many) - Track changes to a `desk` for the specified range of revisions.
15− - [Cancel Subscription](#cancel-subscription)
16−- [%info](#info) - Write and Modify.
17− - [%ins](#ins) - Add a file.
18− - [%del](#del) - Delete a file.
19− - [%mut](#mut) - Change a file.
20− - [Multiple Changes](#multiple-changes) - Change multiple files.
21−- [Manage Mounts](#manage-mounts)
22− - [%boat](#boat) - List mounts.
23− - [%mont](#mont) - Mount something.
24− - [%ogre](#ogre) - Unmount something.
25− - [%dirk](#dirk) - Commit changes.
26−- [Merge Desks](#merge-desks)
28−- [Permissions](#permissions)
29− - [%perm](#perm) - Set file permissions.
30− - [%cred](#cred) - Add permission group.
31− - [%crew](#crew) - Get permission groups.
32− - [%crow](#crow) - Get group usage.
33−- [Foreign Ships](#foreign-ships)
34− - [%warp](#warp-remote) - Read a file on a foreign ship.
35− - [%merg](#merg-remote) - Merge from a foreign `desk`.
39This document contains a number of examples of interacting with Clay using its various `task`s. Sections correspond to the general details in the [API Reference](/docs/arvo/clay/tasks) document.
7This document contains a number of examples of interacting with Clay using its various `task`s. Sections correspond to the general details in the [API Reference](/docs/arvo/clay/tasks) document.
41Most examples will either use `|pass` to just send a `task` or the following thread to send a `task` and take the resulting `gift`. You can save the following thread to the `ted` directory of your `%home` `desk`:
9Most examples will either use `|pass` to just send a `task` or the following thread to send a `task` and take the resulting `gift`. You can save the following thread to the `ted` directory of your `%home` `desk`:
@@ -61,11 +29,11 @@ Most examples will either use `|pass` to just send a `task` or the following thr
61(pure:m !>(~))
29(pure:m !>(~))
64−# `%warp`
32+## `%warp`
66See the [Read and Subscribe](/docs/arvo/clay/tasks#warp---read-and-track) section of the [API Reference](/docs/arvo/clay/tasks) document for general details.
34See the [Read and Subscribe](/docs/arvo/clay/tasks#warp---read-and-track) section of the [API Reference](/docs/arvo/clay/tasks) document for general details.
68−## `%sing`
36+### `%sing`
70Here we'll look at reading files by passing Clay a `%warp` `task` with a `%sing` `rave` and receiving a `%writ` `gift` containing the data in response.
38Here we'll look at reading files by passing Clay a `%warp` `task` with a `%sing` `rave` and receiving a `%writ` `gift` containing the data in response.
@@ -115,7 +83,7 @@ Here's a breakdown of the `task` we sent:
116
84
118−## `%next`
86+### `%next`
120Here we'll look at subscribing to the next version of a file by passing Clay a `%warp` `task` with a `%next` `rave` and receiving a `%writ` `gift` when the file changes.
88Here we'll look at subscribing to the next version of a file by passing Clay a `%warp` `task` with a `%next` `rave` and receiving a `%writ` `gift` when the file changes.
@@ -151,7 +119,7 @@ Here's a breakdown of the task we sent:
152
120
154−## `%mult`
122+### `%mult`
156Here we'll look at subscribing to the next version of multiple files by passing Clay a `%warp` `task` with a `%mult` `rave` and receiving a `%wris` `gift` when any of the files change.
124Here we'll look at subscribing to the next version of multiple files by passing Clay a `%warp` `task` with a `%mult` `rave` and receiving a `%wris` `gift` when any of the files change.
@@ -210,7 +178,7 @@ Here's a breakdown of the `task` we sent:
211
179
213−## `%many`
181+### `%many`
215Here we'll look at subscribing to a range of changes to a `desk` by passing Clay a `%warp` `task` with a `%many` `rave` and receiving `%writ` `gift`s when changes occur.
183Here we'll look at subscribing to a range of changes to a `desk` by passing Clay a `%warp` `task` with a `%many` `rave` and receiving `%writ` `gift`s when changes occur.
@@ -304,7 +272,7 @@ Here's a breakdown of the `task` we sent:
305
273
307−## Cancel Subscription
275+### Cancel Subscription
309Here we'll look at cancelling a subscription by sending Clay a `%warp` `task` with a null `(unit rave)` in the `riff`.
277Here we'll look at cancelling a subscription by sending Clay a `%warp` `task` with a null `(unit rave)` in the `riff`.
@@ -348,11 +316,11 @@ Here's a breakdown of the `task` we sent:
349
317
351−# `%info`
319+## `%info`
353See the [Write and Modify](/docs/arvo/clay/tasks#write-and-modify) section of the [API Reference](/docs/arvo/clay/tasks) document for general details.
321See the [Write and Modify](/docs/arvo/clay/tasks#write-and-modify) section of the [API Reference](/docs/arvo/clay/tasks) document for general details.
355−## `%ins`
323+### `%ins`
357Here we'll look at adding a file by sending Clay a `%info` `task` containing a `%ins` `miso`.
325Here we'll look at adding a file by sending Clay a `%info` `task` containing a `%ins` `miso`.
@@ -371,7 +339,7 @@ Here's a breakdown of the `task` we sent:
372
340
374−## `%del`
342+### `%del`
376Here we'll look at deleting a file by sending Clay a `%info` `task` containing a `%del` `miso`.
344Here we'll look at deleting a file by sending Clay a `%info` `task` containing a `%del` `miso`.
@@ -388,11 +356,11 @@ Here's a breakdown of the `task` we sent:
389
357
391−## `%mut`
359+### `%mut`
393Identical to the [%ins](#ins) example, just replace `%ins` with `%mut`.
361Identical to the [%ins](#ins) example, just replace `%ins` with `%mut`.
395−## Multiple Changes
363+### Multiple Changes
397Here we'll look at changing multiple files in one request by sending Clay a `%info` `task` containing multiple `miso` in the `soba`.
365Here we'll look at changing multiple files in one request by sending Clay a `%info` `task` containing multiple `miso` in the `soba`.
@@ -433,11 +401,11 @@ Save to `ted/multi-change.hoon`, `|commit %home`, and run:
433- /~zod/home/38/baz/txt
401- /~zod/home/38/baz/txt
436−# Manage Mounts
404+## Manage Mounts
438See the [Manage Mounts](/docs/arvo/clay/tasks#manage-mounts) section of the [API Reference](/docs/arvo/clay/tasks) document for general details.
406See the [Manage Mounts](/docs/arvo/clay/tasks#manage-mounts) section of the [API Reference](/docs/arvo/clay/tasks) document for general details.
440−## `%boat`
408+### `%boat`
442Here we'll look at requesting the list of existing mount points on a ship by sending Clay a `%boat` `task` and receiving a `%hill` `gift`.
410Here we'll look at requesting the list of existing mount points on a ship by sending Clay a `%boat` `task` and receiving a `%hill` `gift`.
@@ -448,7 +416,7 @@ Using the `send-task-take-gift.hoon` thread, let's make such a request:
448[%hill p=~[%home]]
416[%hill p=~[%home]]
451−## `%mont`
419+### `%mont`
453Here we'll look at mounting `desk`s, directories and files to unix by sending Clay a `%mont` `task`.
421Here we'll look at mounting `desk`s, directories and files to unix by sending Clay a `%mont` `task`.
@@ -487,7 +455,7 @@ Let's try mounting a subdirectory and a single folder:
488If you look in your pier you'll now see a `gen` folder with the contents of `/gen` and a `hi.hoon` file by itself. Notice how the file extension has been automatically added.
456If you look in your pier you'll now see a `gen` folder with the contents of `/gen` and a `hi.hoon` file by itself. Notice how the file extension has been automatically added.
490−## `%ogre`
458+### `%ogre`
492Here we'll look at unmounting `desk`s, directories and files by sending Clay a `%ogre` `task`.
460Here we'll look at unmounting `desk`s, directories and files by sending Clay a `%ogre` `task`.
@@ -518,7 +486,7 @@ If we specify a non-existent mount point it will fail with an error printed to t
519If we give it an unmounted `beam` it will not print an error but still won't work.
487If we give it an unmounted `beam` it will not print an error but still won't work.
521−## `%dirk`
489+### `%dirk`
523Here we'll look at committing changed files by sending Clay a `%dirk` `task`.
491Here we'll look at committing changed files by sending Clay a `%dirk` `task`.
@@ -535,11 +503,11 @@ Clay will print the changed files to the dojo with a leading `+`, `-` or `:` to
536If you have the same `desk` mounted to multiple points, a committed change in one mount will also update the others.
504If you have the same `desk` mounted to multiple points, a committed change in one mount will also update the others.
538−# Merge Desks
506+## Merge Desks
540See the [Merge Desks](/docs/arvo/clay/tasks#merge-desks) section of the [API Reference](/docs/arvo/clay/tasks) document for general details.
508See the [Merge Desks](/docs/arvo/clay/tasks#merge-desks) section of the [API Reference](/docs/arvo/clay/tasks) document for general details.
542−## `%merg`
510+### `%merg`
544Here we'll look at merging `desk`s by sending Clay a `%merg` `task` and receiving a `%mere` `gift` in response.
512Here we'll look at merging `desk`s by sending Clay a `%merg` `task` and receiving a `%mere` `gift` in response.
@@ -610,11 +578,11 @@ Now change the text in the `foo.txt` in the `%home` `desk`, hit backspace to det
611You can also specify it by revision number or label.
579You can also specify it by revision number or label.
613−# Permissions
581+## Permissions
615See the [Permissions](/docs/arvo/clay/tasks#permissions) section of the [API Reference](/docs/arvo/clay/tasks) document for general details.
583See the [Permissions](/docs/arvo/clay/tasks#permissions) section of the [API Reference](/docs/arvo/clay/tasks) document for general details.
617−## `%perm`
585+### `%perm`
619Here we'll look at setting permissions by sending Clay a `%perm` `task`.
587Here we'll look at setting permissions by sending Clay a `%perm` `task`.
@@ -694,7 +662,7 @@ Here's a breakdown of a `%perm` task:
695
663
697−## `%cred`
665+### `%cred`
699Here we'll look at creating a permission group by sending Clay a `%cred` `task`.
667Here we'll look at creating a permission group by sending Clay a `%cred` `task`.
@@ -706,7 +674,7 @@ Let's create a group called `'foo'` with a few ships:
707We'll check it with the next kind of `task`: [%crew](#crew).
675We'll check it with the next kind of `task`: [%crew](#crew).
709−## `%crew`
677+### `%crew`
711Here we'll look at retrieving permission groups by sending Clay a `%crew` `task` and receiving a `%cruz` `gift` in response.
679Here we'll look at retrieving permission groups by sending Clay a `%crew` `task` and receiving a `%cruz` `gift` in response.
@@ -717,7 +685,7 @@ Let's check, using the `send-task-take-gift.hoon` thread, for the permission gro
717[%cruz cez={[p=~.foo q={~nec ~bud ~wes ~zod ~sev}]}]
685[%cruz cez={[p=~.foo q={~nec ~bud ~wes ~zod ~sev}]}]
720−## `%crow`
688+### `%crow`
722Here we'll look at retrieving a list of all files and directories in all `desk`s which have permissions set for a group by sending Clay a `%crow` `task` and receiving a `%croz` `gift` in response.
690Here we'll look at retrieving a list of all files and directories in all `desk`s which have permissions set for a group by sending Clay a `%crow` `task` and receiving a `%croz` `gift` in response.
@@ -749,11 +717,11 @@ Now we'll use the `send-task-take-gift.hoon` thread to try `%crow`:
752−# Foreign Ships
720+## Foreign Ships
754See the [Foreign Ships](/docs/arvo/clay/tasks#foreign-ships) section of the [API Reference](/docs/arvo/clay/tasks) document for general details.
722See the [Foreign Ships](/docs/arvo/clay/tasks#foreign-ships) section of the [API Reference](/docs/arvo/clay/tasks) document for general details.
756−## `%warp` - Remote
724+### `%warp` - Remote
758Here we'll look at reading files on a foreign ship by sending Clay a `%warp` `task` with a foreign ship in the `wer` field and receiving a `%writ` `gift` in response.
726Here we'll look at reading files on a foreign ship by sending Clay a `%warp` `task` with a foreign ship in the `wer` field and receiving a `%writ` `gift` in response.
@@ -816,7 +784,7 @@ call: failed
816/sys/vane/clay/hoon:<[1.365 48].[1.365 50]>
784/sys/vane/clay/hoon:<[1.365 48].[1.365 50]>
819−## `%merg` - Remote
787+### `%merg` - Remote
821To merge a foreign `desk` into a local one, you just send Clay a `%merg` `task` (as you would for a local merge) and specify the foreign ship in the `her` field. For an example, see the [%merg](#merg) section.
789To merge a foreign `desk` into a local one, you just send Clay a `%merg` `task` (as you would for a local merge) and specify the foreign ship in the `her` field. For an example, see the [%merg](#merg) section.