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