←  APIs and Utilities

ComputerCraft | Programmable Computers for Minecraft

»

"tree" program for ComputerCraft

CrazedProgrammer's Photo CrazedProgrammer 09 Jan 2017

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:
Posted Image
(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 by CrazedProgrammer, 09 January 2017 - 11:06 PM.
Quote

Cross_Sans's Photo Cross_Sans 25 Jan 2017

Interresting, this could be useful if the program has a filter (to display only a certain list of file via a pattern...).
Edited by Redall, 25 January 2017 - 03:38 PM.
Quote

apemanzilla's Photo apemanzilla 25 Jan 2017

For consistency reasons, you should make it so that it respects the list.show_hidden setting.
Quote

CrazedProgrammer's Photo CrazedProgrammer 25 Jan 2017

View Postapemanzilla, on 25 January 2017 - 03:58 PM, said:

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.

View PostRedall, on 25 January 2017 - 03:37 PM, said:

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.
Quote

Cross_Sans's Photo Cross_Sans 26 Jan 2017

View PostCrazedProgrammer, on 25 January 2017 - 11:07 PM, said:

...

Okay. Anyway, useful program.
Quote