Book Image

Learning Boost C++ Libraries

By : Arindam Mukherjee
Book Image

Learning Boost C++ Libraries

By: Arindam Mukherjee

Overview of this book

Table of Contents (19 chapters)
Learning Boost C++ Libraries
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Managing files and directories with Boost Filesystem


Software written using the Boost libraries runs on multiple operating systems, including Linux, Microsoft Windows, Mac OS, and various other BSD variants. How these operating systems access paths to files and directories may differ in several ways; for example, MS Windows uses backward slashes as the directory separator while all Unix variants, including Linux, BSD, and Mac, use forward slashes. Non-English operating systems may use other characters as directory separators, and sometimes, multiple directory separators may be supported. The Boost Filesystem library hides these platform-specific peculiarities and lets you write code that is much more portable. Using the functions and types in the Boost Filesystem library, you can write OS-agnostic code to perform common operations on the filesystem that an application needs to run, like copying, renaming, and deleting files, traversing directories, creating directories and links, and so...