使用C ++跨平台递归文件列表? [英] Cross platform recursive file list using C++?

查看:66
本文介绍了使用C ++跨平台递归文件列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在特定目录及其子目录中递归列出文件的最有效方法是什么?我应该使用标准库还是使用某些第三方?

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?

我想要这样做,因为我使用v8作为JavaScript引擎,并且希望在某个目录(及其子目录)中执行所有脚本。如果在v8中有任何内置方法可以实现,那就太好了:)

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 :)

它应该支持Windows,Linux和OS X。

It should support Windows, Linux and OS X.

谢谢。

推荐答案

有关通用的跨平台C ++解决方案,请查看 boost ::文件系统

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

这篇关于使用C ++跨平台递归文件列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆