All about programming in GNU/LINUX

opendir system call in GNU/LINUX

#include<sys/types.h>

#include<dirent.h>

DIR *opendir(const char *name) //the path of the directory to be opened

The opendir system call returns a pointer to the directory structure which is used for reading directory entries

It Returns NULL on failure

As the opendir system call returns pointer to the directory structure it can be used to access the structure members .

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s