Alex Rivera | Logout

recursive folder scanning in c++

Asked 2009-06-11T20:11:05.403
14

I want to scan a directory tree and list all files and folders inside each directory. I created a program that downloads images from a webcamera and saves them locally. This program creates a filetree based on the time the picture is downloaded. I now want to scan these folders and upload the images to a webserver but I´m not sure how I can scan the directories to find the images. If anyone could post some sample code it would be very helpful.

edit: I´m running this on an embedded linux system and don´t want to use boost

Edit
Report

1 Answer

6

Boost.Filesystem allows you to do that. Check out the docs!

EDIT:
If you are using Linux and you don't want to use Boost, you will have to use the Linux native C functions. This page shows many examples on how to do just that.

answered 2009-06-11T20:13:55.550

Your Answer