urbit/main/bin/tree.hoon

17 lines
367 B
Plaintext
Raw Normal View History

2014-08-08 01:25:53 +04:00
!:
:: /===/bin/tree/hoon
|= ^
|= [pax=path fla=$|(~ [%full ~])]
=- ~[te/-]~
=+ len=(lent pax)
=+ rend=?~(fla |=(a=path +:(spud (slag len a))) spud)
|- ^- wain
=+ ark=;;(arch .^(cy/pax))
=- ?~ q.ark -
[(crip (rend pax)) -]
%- zing
2014-09-03 11:20:08 +04:00
%- turn :_ |=(a=@t ^$(pax (weld pax `path`/[a])))
%- sort :_ aor
%- turn :_ |=([a=@t ~] a)
(~(tap by r.ark))