4.1. The Possibilities

This chapter discusses the methods available in the APIs for manipulating directories, and then turns to the directory-walking functions. You will learn how to do the following:

  • Create and delete directories

  • Set the current directory or find out the current directory

  • Search a directory for a file

  • Recursively traverse all of the directories on a drive

  • Asynchronously detect changes to files and directories. For example, if you are writing a text-editor application, you can make the program detect when some other process has modified a file that the editor is currently editing, and warn the user of the change.

The asynchronous detection functions in particular are quite unique, and you will find many interesting ways to use them. ...

Get Win32 System Services: The Heart of Windows® 98 and Windows® 2000 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.