FILETRE Instructions E~/sar vie 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...

How do I do this? Using python
FILETRE<br>Instructions<br>E~/sar<br>vie<br>Write a recursive function, displayFiles, that expects a pathname as an argument. The path<br>name can be either the name of a file or the name of a directory. If the pathname refers to a file, its<br>filepath is displayed, followed by its contents, like so:<br>File name: file_path<br>Lorem ipsum dolor sit amet,<br>consectetur adipiscing elit...<br>Otherwise, if the pathname refers to a directory, the function is applied to each name in the<br>directory, like so:<br>Directory name: directory_path<br>File name: file_pathl Lorem ipsum dolor sit amet..<br>File name: file_path2 Lorem ipsum dolor sit amet. ..<br>Test this function in a new program.<br>Grading<br>When you have completed your program, click the Submit button to record your score.<br>

Extracted text: FILETRE Instructions E~/sar vie 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_pathl Lorem ipsum dolor sit amet.. File name: file_path2 Lorem ipsum dolor sit amet. .. Test this function in a new program. Grading When you have completed your program, click the Submit button to record your score.

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here