What is the difference between open and opendir calls on UNIX?

2

If the opening of files is used the system call open, because there is another system call to open files directory (opendir), if a directory is a file type? Was not it just a call for all file types?

    
asked by anonymous 31.10.2014 / 05:28

2 answers

1

In thesis could but you would have to filter out what is dir or not, could err or not pay attention to all the details. opendir treats a directory in a more specific way. It is essentially a facilitator for open for a specific situation.

    
31.10.2014 / 05:52
0

As far as I know, open opens all file types, less directories.

Now opendir returns DIR * from the open directory that is passed to readdir() to read its content.

    
31.10.2014 / 05:51