2

What is the most efficient way to recursively list files in a specific directory and its subdirectories? Should I use the standard library, or use some third party?

I want this because I use v8 as a JavaScript engine, and I want to execute all scripts in some directory (and its subdirectories). If there's any built-in way to do that in v8, great :)

It should support Windows, Linux and OS X.

Thanks.

Alon Gubkin
  • 56,458
  • 54
  • 195
  • 288
  • See also: http://stackoverflow.com/questions/67273/how-do-you-iterate-through-every-file-directory-recursively-in-standard-c – Owen S. Jul 03 '10 at 06:26

1 Answers1

4

For a generic cross-platform C++ solution, check out boost::filesystem

Cogwheel
  • 22,781
  • 4
  • 49
  • 67