Question: Programming Exercise 6.7 Write a recursive function, displayFiles, that expects a pathname as an argument. The pathname can be either the name of a file
Programming Exercise 6.7
Write a recursive function, displayFiles, that expects a pathname as an argument. The pathname can be either the name of a file or the name of a directory. If the pathname refers to a file, its name is displayed, followed by its contents. Otherwise, if the pathname refers to a directory, the function is applied to each name in the directory. Test this function in a new program. 
Programming Exercise 6.7 Terminal 1+ Instructions sandbox e Information Write a recursive function, displayFiles , that expects a pathname as an argument. The pathname can be either the name of a file or the name of a directory. If the pathname refers to a file, its name is displayed, followed by its contents. Otherwise, if the pathname refers to a directory, the function is applied to each name in the directory. Test this function in a new program Review Mode Project Help Download Share Theme Light Kevman
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
