. POSIX :
1. int open(char * fname, int flags, mode_t mode)
, . - , . . .
char * fname . int flags - , . , ; , , . mode .
2. off_t lseek(int handle, off_t offset, int whence)
/ . offset , , whence - . , (SEEK_SET), (SEEK_END) (SEEK_CUR). , . , lseek (handle, 0, SEEK_CUR) , .
3. int read(int handle, char * where, size_t how_much)
. where , ; , . , / , . , , . . , read .
4. int ioctl (int handle, int cmd,...); int fcntl (int handle, int cmd,...)
. , -, , ioctl - , fcntl - , . POSIX , ( , ), , , truncate - . Unix truncate . , .
. POSIX , Unix fcntl.
|
|
5. caddr_t mmap (caddr_t addr, size_t len, int prot, int flags, int handle, off_t offset)
. prot : , . , .
, : . , Unix, , . .
, . .
, CFile - Seek, SeekToBegin, SeekToEnd. CFile , , - GetLength, SetLength. . , , . , Seek. , .
, . SeekToBegin , SeekToEnd - . . GetLength. . SetLength . , . GetPosition. GetPosition 32- .