Advertisement

Dir list

Started by April 09, 2002 10:49 PM
1 comment, last by krad7 22 years, 9 months ago
how do i get the contents of a directory using c program.. i just need to get the names of the files and dir.. something like ls command but i dont wanna know all the stuff like its date of creation and stuff.. just wanna know what files are present and which of them are dir.. thanx in advance Slow and steady wins the race.
Slow and steady wins the race.
Directory contents : opendir(), closedir(), readdir(), rewinddir(), telldir(), seekdir(), scandir()
File properties : fstat()
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Advertisement
Depends on what you want to do, but glob() can be really useful sometimes

cu,
Prefect
Widelands - laid back, free software strategy

This topic is closed to new replies.

Advertisement