Computer Science Homework Help

South University Reading and Writing Files in a Directory Project

 

I’m trying to study for my Computer Science course and I need some help to understand this question.

Reading and Writing Files in a Directory

Create a program that provides a listing of all the files in a directory. The program should be a Java application that accepts a single argument into the args array of the main() method. This argument identifies the name of a directory. The application should make sure that this filename really does identify a directory and then list all of the files in the directory. For each file, list whether the file is a file or a directory and list the size for each file. The program should print its output to System.out.