in reply to reading file in directory
Maybe the file doesn't exist or you haven't appropriate permissions? Or maybe the file is not where you think it is? Note that readdir doesn't prepend the directory path used in opendir to the values returned so you have to do that yourself.
It helps to include the file name that was used in the open in the error message so you can verify that the file you were attempting to open was the file you intended to open.
|
|---|