Monday - Lecture 18 - Files & Folders
Date: July 20

Imperatives are simply statements in programs that affect the “state” of our computer. While we’ve used these inside of our programs to affect the value of variables, mutate properties of objects, and even print outputs to the Interactions window, so far our changes have been limited to DrRacket itself. What if instead, we used this idea of imperative changes to affect the computer itself by modifying files and folders on our machines?

Computers refer to every folder (directory) and file on your computer via a pathname. These pathnames represent “how to get from the root of the file system to the file/folder you want.

They also represent “paths” along a tree that represents our file system. A tree you say!?!? We know how to deal with those! So let’s try out some tree recursion but with file systems!


In-Class Resources


📊 Slides
🏸 RKT Examples
🎬 Available Videos 🎥
Link Title Type Duration
Video 1 Lecture 18.1 - Intro to Files and Folders pre-recorded
Video 2 Lecture 18.2 - Dealing with Paths pre-recorded
Video 3 Lecture 18.3 - Traversing a Directory Structure Tree pre-recorded