urbit/gen/tree.hoon
2015-09-11 15:00:11 -07:00

22 lines
399 B
Plaintext

:: Tree view recursive directory contents
::
:::: /hoon/tree/gen
::
!:
::::
::
:- %cat
|= [^ [pax=path fla=$|(~ [%full ~])] ~]
=+ len=(lent pax)
=+ rend=?^(fla dank:ut |=(a=path (dank:ut (slag len a))))
:- %tang %- flop
|- ^- tang
=+ ark=;;(arch .^(cy/pax))
=- ?~ q.ark -
[(rend pax) -]
%- zing
%+ turn
(sort (~(tap by r.ark)) aor)
|= [a=@t ~]
^$(pax (welp pax /[a]))