Re: [Code] Random file accessing

From: Daniel Koepke (dkoepke@california.com)
Date: 01/12/97


On Sun, 12 Jan 1997, Eric de Groot wrote:

> Hiya peoples-
> 
>    Can any one out  there explain and/or give me a couple points on a good
> method of reading each file in a specified directory without knowing file
> names?
> 
> I want to enter a specified directory, and then open the each file present
> in 
> that dir one at a time.
> 
> Are there any functions that deal with this?

Sure.  The opendir(), readdir(), rewinddir(), closedir(), and
scandir() functions.  The headers being <sys/types.h> and
<dirent.h>.

If you need further help, I'll be happy to help, but try it by
yourself first, please... :)


--
Daniel Koepke
dkoepke@california.com
Forgive me father, for I am sin.


+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST