Contents    Page-10    Prev    Next    Page+10    Index   

Searching Directories for a File

Given a tree-structured directory of files and a file path, we want to find the file specified by the path. This is an important task for an operating system. For example, given a command:

javac /u/novak/cs314/asg4/

the OS must convert the file path into the disk address of the file.

We will assume that a parsing program has converted the file path into a list of strings or symbols,

(u novak cs314 asg4

Our task, then, is to search a tree-structured directory to find the desired file, given the file path.