Reading and Deleting Directories
This lesson goes into details of how to read and delete directories.
We'll cover the following...
Reading directories
Now that we’ve created a directory, we might wish to read one too. Indeed, that is exactly what the program ls
does. Let’s write our own little tool like ls and see how it is done.
Instead of just opening a directory as if it were a file, we instead use a new set of calls. Below is an example program that prints the contents of a ...