Merge pull request #6057 from urbit/jm/recurse-rm

kiln: recursive `|rm`
This commit is contained in:
Philip Monk 2023-01-17 15:32:30 -07:00 committed by GitHub
commit cb95c641a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -766,11 +766,19 @@
::
++ poke-rm
|= a=path
=| c=(list (unit toro))
%+ poke-info "removed: {<a>}"
=- %+ roll -
|= [a=(unit toro) b=(unit toro)]
(clap a b furl)
|- ^- (list (unit toro))
=+ b=.^(arch %cy a)
?~ fil.b
=+ ~[leaf+"No such file:" leaf+"{<a>}"]
abet:(spam -)
(poke-info "removed" `(fray a))
?: ?=([^ ~] b) (snoc c `(fray a))
=? c ?=(^ fil.b) (snoc c `(fray a))
%- zing
%+ turn ~(tap by dir.b)
|= [kid=@ta ~]
^$(a (weld a /[kid]))
::
++ poke-schedule
|= [where=path tym=@da eve=@t]