From reading various articles on the net, I know stat() is used on files to get things like permissions, sizes etc... As a folder is a special type of file in Unix, I assumed that stat() could work on it as well as any general file.
However, from running my program, perror() reported that the folder does not exist, so Im curious to know what Ive done wrong
struct dirent *list;
DIR *d_entry;
struct stat buff;
/*Open directory & access
elements within it*/
if( stat(list->d_name,&buff) == -1)
{
perror("stat()");
}
else
{
....
}
thanks in advance