open, read, write (POSIX I/O)
Në shqip: Leximi dhe shkrimi me POSIX
ShpjegimiSQ
Përveç fopen() të stdio, Unix-i ka funksionet e nivelit më të ulët open(), read(), write() dhe close() që punojnë me file descriptor-ë. Pa buffer — më afër sistemit operativ.
EnglishEN
Besides stdio's fopen(), Unix has the lower-level functions open(), read(), write() and close() that work with file descriptors. No buffering — closer to the operating system.
Si ta mendosh
Si t'i flasësh drejtpërdrejt magazinierit në vend që të kalosh nga sporteli.
Lexoje në anglisht
Like talking directly to the storekeeper instead of going through the counter.
Shembull kodic
int fd = open("notat.txt", O_RDONLY);
char b[100];
ssize_t n = read(fd, b, sizeof b);
close(fd);