We'll continue working with file IO and exception handling by building a simple text-based interface for browsing the file system.

When your program starts it should ask the user if they would like to dump results to a log file IN ADDITION to standard out. If so, your program should prompt for the name of the log file. If the file already exists, the contents should be overwritten.

The program will then display (6) options to the user:

  • List the contents of a directory provided by the user
  • List the contents of a directory provided by the user as well as all of its sub directories. (hint: use recursion)
  • Locate a file with a given name.
  • Locate files with a given file extension
  • Concatenate the contents of 2 files whose names are provided by the user and output the result to a third file (name also provided by the user)
  • Exit

You should refer to the File class API provided in the java.io package.

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.