Modify this chapter’s DirectoryDescription program to print name and size information for only those files whose “glob” pattern matches a user-specified string. To do this, you’ll need to prompt for and read the desired “glob” pattern. In addition to
Scanner,you’ll need to use the Java API
FileSystemand
PathMatcherclasses to create a
matcherobject like that in the
FileVisitorconstructor in Figure. Then, you’ll need to put the for-each loop’s
printfstatement inside an
ifstatement whose condition is something like
matcher.matches(name),where
name = path.getFileName().
Figure FileVisitor class–part A

We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.