开发者

list all files with a paticular extension of a dir in C

In C, can I li开发者_如何学Pythonst all files with certain extension inside a dir?

Any api available?

"ls" would be the last thing I want to do.

Thanks in advance.


On UNIX, you're looking for opendir and readdir (and maybe fnmatch) or alternatively glob (which puts those three together for you). These are not part of C, but rather POSIX.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜