title: Linux C read a directory
body: <p>Hello I want to read from and write to a directory just like reading from and writing to files. I always use the <code>open</code>, <code>read</code>, <code>write</code> and <code>close</code> functions, which means I use descriptors. But doing this on a directory doesn't work, the <code>open</code> call works, but <code>read</code> returns -1 and <code>errno</code> is EISDIR. Am I forced to use streams to read a directory?</p>