Question: NEEDS DONE IN C, NO OTHER LANGUAGE. ALSO NEEDS TO BE ABLE TO COMPILE IN GCC Extend the readdir program to traverse the file hierarchy
NEEDS DONE IN C, NO OTHER LANGUAGE. ALSO NEEDS TO BE ABLE TO COMPILE IN GCC
Extend the readdir program to traverse the file hierarchy recursively and list all the sub directories and the files in these sub directories. Note that you have to modify the given readdir.c (or readdir_v2.c) program to use a function to perform the file traversal and then invoke it recursively.
---------------------------------------------------------------------------------------------------------------
readdir.c:
#####################
#include
int main (int argc, char **argv) { struct dirent *dirent; DIR *parentDir;
if (argc < 2) { printf ("Usage: %s
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
