Question: To be done in Python3 Write a recursive function, displayFiles, that expects a pathname as an argument. The path name can be either the name

 To be done in Python3 Write a recursive function, displayFiles, that

To be done in Python3

Write a recursive function, displayFiles, that expects a pathname as an argument. The path name can be either the name of a file or the name of a directory. If the pathname refers to a file, its filepath is displayed, followed by its contents, like so: File name: file_path Lorem ipsum dolor sit amet, consectetur adipiscing elit... Otherwise, if the pathname refers to a directory, the function is applied to each name in the directory, like so: Directory name: directory_path File name: file_pathi Lorem ipsum dolor sit amet... File name: file_path2 Lorem ipsum dolor sit amet... Test this function in a new program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!