dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


advertisement
 

Facilitate Directory Operations with the <dirent.h> and <dir.h> Libraries

Because standard C++ doesn't have a library for manipulating directories, programmers are forced to use workarounds that waste their time and compromise code portability. Thankfully, you can use the quasi-standard <dirent.h> and <dir.h> libraries to manipulate directories in a portable and platform-neutral fashion.


advertisement

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


isk defragmenters, antiviruses, backup utilities, and file compression tools are a few examples of applications that operate on directories. Alas, standard C++ doesn't have a library for manipulating directories. Consequently, programmers resort to third-party libraries and platform-dependent hacks for mundane operations such as listing files in a directory, creating new directories, and deleting directory files. These workarounds compromise code portability and force developers to learn different libraries every time. Thankfully, you can use the quasi-standard <dirent.h> and <dir.h> libraries to manipulate directories in a portable and platform-neutral fashion.


How can you operate on directories using a portable and standardized library?


Use the <dirent.h> and <dir.h> libraries to list directory files and perform other directory-related operations.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date