Can someone help me with reading a direcory in C under Linux? I have the Redhat version. Several books I have
show that reading a directory is same as any other file, at least if it is opened for reading only. When I
try, the open works o.k., but I get no data with a read, and if I issue a perror() after the read, the
returned message says the file I am trying to read is a directory. I know that, of course, and I would like to
have it return the data to me. I have tried using stream I/O and the older I/O method with no luck. And I'm
using simple programs that are given in the books I have.
Thanks in advance,