O'Reilly logo

Just Enough C/C++ Programming by Guy W. Lecky-Thompson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Directory Management

I have tried to remain operating system independent throughout this chapter, but often there are some functions that are tied to a specific platform. Directory-handling functions are one such area—the Windows API has specific directory (and file) handling functions, as do other APIs.

However, the ANSI C specification does provide, in the io.h library, a number of useful functions for handling directories. Although there are many functions in io.h, in the interest of providing just enough information to enable you to achieve useful programming tasks, this chapter looks at three main areas:

  • Creating and deleting directories
  • Renaming and deleting files
  • Searching for files and directories

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required