This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
CrazedProgrammer's profile picture

"tree" program for ComputerCraft

Started by CrazedProgrammer, 09 January 2017 - 10:03 PM
CrazedProgrammer #1
Posted 09 January 2017 - 11:03 PM
Disappointed by the lack of a "tree" program in ComputerCraft?
Fear no more!

Download:

pastebin get R0VTnLg0 tree

Usage:

tree [directory]
If you don't specify a directory it will use the current directory.

Screenshot:

(also supports black-and-white screens)

If you want to have tree available at all times, it is recommended that you append this to your startup script:

shell.setAlias("tree", "/tree")
Edited on 09 January 2017 - 10:06 PM
Cross_Sans #2
Posted 25 January 2017 - 03:37 PM
Interresting, this could be useful if the program has a filter (to display only a certain list of file via a pattern…).
Edited on 25 January 2017 - 02:38 PM
apemanzilla #3
Posted 25 January 2017 - 03:58 PM
For consistency reasons, you should make it so that it respects the list.show_hidden setting.
CrazedProgrammer #4
Posted 25 January 2017 - 11:07 PM
For consistency reasons, you should make it so that it respects the list.show_hidden setting.
Didn't know that existed.
I'll add it sometime.

Interresting, this could be useful if the program has a filter (to display only a certain list of file via a pattern…).
I feel like this isn't the best thing for a "tree" program but more for a "search" program.
Cross_Sans #5
Posted 26 January 2017 - 03:48 PM

Okay. Anyway, useful program.