unix files - university of georgia.pptVIP

  • 5
  • 0
  • 约1.53万字
  • 约 54页
  • 2016-05-10 发布于山西
  • 举报
unix files - university of georgia

UNIX System Programming Files and Directories File Pointer Both read() and write() will change the file pointer. The pointer will be incremented by exactly the number of bytes read or written. lseek #include sys/types.h #include unistd.h off_t lseek( int fd, off_t offset, int whence ); Repositions the offset of the file descriptor fd to the argument offset. whence SEEK_SET The offset is set to offset bytes. SEEK_CUR The offset is set to its current location plus offset bytes. SEEK_END The offset is set to the size of the file plus offset bytes. lseek: Examples Random access Jump to a

文档评论(0)

1亿VIP精品文档

相关文档