Chapter 3. Advanced File and Directory Processing, and the Registry
File systems provide more than sequential processing; they must also provide direct access, file locking, directory processing, and file attribute management. Starting with direct file access, which is required by database, file management, and many other systems, this chapter shows how to manage file pointers to access files at any location. In particular, it is necessary to show how to use Windows' 64-bit file pointers, because the NTFS can support huge files.The next step is to show how to scan directory contents and how to manage and interpret file attributes, such as time stamps, access, and size. Finally, file locking protects files from concurrent modification by more than one process.The final topic is the Windows registry, a centralized database that contains configuration information for applications and for the system itself. Registry access functions and program structure are similar to the file and directory management functions, as shown by the final program example, so this short topic is included at the chapter's end rather than creating a separate chapter for it.
