Question: 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
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. Indentation doesn't appear on this page please include a screenshot so I can use to indent.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
