Skip to content

berial/FileTreePrinter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FileTreePrinter

打印指定路径的目录树 Print the directory tree for the specified path

use FileTreePrinter.class

print:
$ java C:\Program Files\Internet Explorer

create file:
$ java C:\Program Files\Internet Explorer .\tree.txt
public static void main(String[] args) {
    if (args.length > 0) {
        FileTreePrinter printer = new FileTreePrinter(args[0]);

        if (args.length > 1) {
            printer.createFileTreeFile(args[1]);
        } else {
            printer.printFileTree();
        }
    }
}

result:

+--- en-US
|    \--- hmmapi.dll.mui
+--- images
|    \--- bing.ico
+--- SIGNUP
|    \--- install.ins
+--- zh-CN
|    +--- ieinstal.exe.mui
|    \--- iexplore.exe.mui
+--- ExtExport.exe
+--- hmmapi.dll
+--- iediagcmd.exe
+--- ieinstal.exe
+--- ielowutil.exe
+--- IEShims.dll
\--- iexplore.exe

About

打印指定路径的目录树

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages