clay: add -read to demonstrate live ford builds

This commit is contained in:
Philip Monk 2020-04-15 20:12:47 -07:00
parent 6441116e9f
commit 522a7fb933
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC

20
pkg/arvo/ted/read.hoon Normal file
View File

@ -0,0 +1,20 @@
/- spider
/+ strandio
=, strand=strand:spider
^- thread:spider
|= arg=vase
=/ m (strand ,vase)
^- form:m
:: Parse arguments as ship, desk, and path
::
=+ !<([=target=path ~] arg)
:: Read the file, possibly asyncrhonously
::
;< =bowl:spider bind:m get-bowl:strandio
;< =riot:clay bind:m
(warp:strandio our.bowl %home ~ %next %a [%da now.bowl] target-path)
?~ riot
~& %nothing
(pure:m !>("nothing"))
%- (slog leaf+"got writ" (sell !<(vase q.r.u.riot)) ~)
(pure:m !<(vase q.r.u.riot))