Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 1.06 KB

README.md

File metadata and controls

36 lines (28 loc) · 1.06 KB

Tree

Lists the contents of directories in a tree-like format.

How to use

For example:

This command prints all files and folders begining from /home directory.

java -jar NameOfGeneratedJar.jar ./home -a

Print help.

java -jar NameOfGeneratedJar.jar -h

How to contribute

This project is constructed that is very simple to implement new functionality.

You have only to do:

  • Create new class inside traverse package that names will be like its functionality.
  • Extends this class with the AbstractTree class from root package.
  • You must override only two methods to add new functionality.
void createLeaf(String prefix, File file, String leftLeaf, String rightLeaf);
void printTree(String directory);
  • Add new shortcut to Arguments enum class.
  • Add this shortcut to Help class.
  • Add new condition to Main class.

Tree use help from JColor library to colorize some printed strings. You can simply use its too.