Write a program that lists all files in a directory and its


Question: Write a program that lists all files in a directory (and its subdirectories), much like the Unix ls command or the Windows dir command. Note that when a directory is encountered, we do not immediately print its contents recursively. Rather, as we scan each directory, place any subdirectories in a List. After the directory entries are printed, then process each subdirectory recursively. For each file that is listed, include the modification time, the file size, and if it is a directory, have your output say so. For each directory, print the complete directory name prior to printing its contents.

Solution Preview :

Prepared by a verified Expert
Data Structure & Algorithms: Write a program that lists all files in a directory and its
Reference No:- TGS02462593

Now Priced at $20 (50% Discount)

Recommended (91%)

Rated (4.3/5)