From 522a7fb933cb4657e133c6067757c0a937336f4b Mon Sep 17 00:00:00 2001 From: Philip Monk Date: Wed, 15 Apr 2020 20:12:47 -0700 Subject: [PATCH] clay: add -read to demonstrate live ford builds --- pkg/arvo/ted/read.hoon | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pkg/arvo/ted/read.hoon diff --git a/pkg/arvo/ted/read.hoon b/pkg/arvo/ted/read.hoon new file mode 100644 index 000000000..9da53401c --- /dev/null +++ b/pkg/arvo/ted/read.hoon @@ -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))