2
If the open file uses the open system call, why is there another system call to open files directory (opendir), if a directory is a file type? It wasn’t supposed to be a call just for all kinds of files?
2
If the open file uses the open system call, why is there another system call to open files directory (opendir), if a directory is a file type? It wasn’t supposed to be a call just for all kinds of files?
1
0
As far as I know open
opens all file types, except directories.
Already opendir
returns DIR* from the open directory that is passed to readdir()
to read its contents.
Browser other questions tagged c api filing-cabinet directory unix
You are not signed in. Login or sign up in order to post.
Take a look at [tour]. You can accept an answer if it solved your problem. You can vote on every post on the site as well. Did any help you more? You need something to be improved?
– Maniero