shrub/gen/tree.hoon

22 lines
397 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 03:24:51 +03:00
:- %say
2015-05-28 05:46:58 +03:00
|= [^ [pax=path fla=$|(~ [%full ~])] ~]
=+ len=(lent pax)
2015-11-29 01:44:29 +03:00
=+ rend=?^(fla smyt |=(a=path (smyt (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))
=- ?~ fil.ark -
2015-05-28 05:46:58 +03:00
[(rend pax) -]
%- zing
%+ turn
(sort (~(tap by dir.ark)) aor)
2015-05-28 05:46:58 +03:00
|= [a=@t ~]
^$(pax (welp pax /[a]))