Question: Using the String-processing capabilities, the file and directory capabilities and a Map, create an application that recursively walks a directory structure supplied by the user

Using the String-processing capabilities, the file and directory capabilities and a Map, create an application that recursively walks a directory structure supplied by the user and reports the number of files of each file type (such as .java, .txt, .class, .docx, etc.) that exist in the specified directory path. Display the filename extensions in sorted order. Next, investigate method walk of class the Files. This method returns a stream that walks a directory and its subdirectories and returns the contents to you as a stream. Then, reimplement the first part of this exercise, using lambdas and streams, rather than recursion.

Step by Step Solution

3.39 Rating (152 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

This is a twopart question 1 Creating a recursive function that reads a directory structure and reports the number of files of each type 2 Reimplement... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java How To Program Late Objects Questions!