read
ssize_t read(int fd,void *buffer,size_t count);
use
read count bytes from fd to buffer
return code
read return the number of bytes read or -1 and set errno if an error happend
EFAULTbufferpoint to outside of the addressable spaceEBADFthe specified file descriptor don’t exist , is not open or is not open for readingEISDIRthe specified file descriptor is a directory
NOTE : use thereaddirsyscall or even better the opendir apiEIOio error