How to get all the files in a directory?

Z

zjffdu

I would like to get all the files in a directory.
How can I sovle this problem?

thanks?
 
D

Daz

Check out your compilers manual. If you are using Winblows, you might
want to look at _findfirst and _findnext. As for *nix, I am not so
sure. Sorry
 
L

Larry I Smith

Daz said:
Check out your compilers manual. If you are using Winblows, you might
want to look at _findfirst and _findnext. As for *nix, I am not so
sure. Sorry

#include <dirent.h>

opendir(), readdir(), closedir(), rewinddir(), telldir(), seekdir()
 
N

Ni@m

In *nix you can also open directory iin "raw" mode using `open` system
call and read the structure of directory, but for sure use opendir(),
readdir(), closedir() functions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,436
Messages
2,571,696
Members
48,796
Latest member
Greg L.
Top