In Section 10.2.4, we examined copying and deleting files and directories. The tools we used – copytree, rmtree, and move – automatically handled directory trees. For instance, a copy operation using copytree on a directory copies not just the topmost directory but all files and subdirectories underneath the topmost directory, and so on to every file and subdirectory. In the present chapter, we explore how a programming language implements the idea of “do-this-action-over-nested-levels” through the principle of recursion.
Review the options below to login to check your access.
Log in with your Cambridge Higher Education account to check access.
If you believe you should have access to this content, please contact your institutional librarian or consult our FAQ page for further information about accessing our content.