Skip to content

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

License

Notifications You must be signed in to change notification settings

grzesiekkedzior/Tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages