shrub/gen/tree.hoon

22 lines
399 B
Plaintext
Raw Normal View History

2015-05-28 05:46:58 +03:00
:: Tree view recursive directory contents
::
2015-09-12 00:15:25 +03:00
:::: /hoon/tree/gen
2015-05-28 05:46:58 +03:00
::
!:
::::
::
2015-09-12 00:15:25 +03:00
:- %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]))