urbit/cat/tree.hoon

21 lines
390 B
Plaintext
Raw Normal View History

2015-05-28 05:46:58 +03:00
:: Tree view recursive directory contents
::
2015-06-05 03:27:01 +03:00
:::: /hoon/tree/cat
2015-05-28 05:46:58 +03:00
::
!:
::::
::
|= [^ [pax=path fla=$|(~ [%full ~])] ~]
=+ len=(lent pax)
=+ rend=?^(fla dank:ut |=(a=path (dank:ut (slag len a))))
2015-06-17 00:36:04 +03:00
:- %tang %- flop
2015-05-28 05:46:58 +03:00
|- ^- tang
=+ ark=;;(arch .^(cy/pax))
=- ?~ q.ark -
[(rend pax) -]
%- zing
%+ turn
(sort (~(tap by r.ark)) aor)
|= [a=@t ~]
^$(pax (welp pax /[a]))