开发者

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

开发者 https://www.devze.com 2023-03-16 02:32 出处:网络
In C, can I li开发者_如何学Pythonst all files with certain extension inside a dir? Any api available?

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

精彩评论

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

关注公众号