缓冲输入输出
来源:互联网 发布:百分百软件破解版 编辑:程序博客网 时间:2024/05/16 07:23
- 1.fopen()打开文件,返回流
- FILE* fopen(const char * path, const char * mode);
- 2.fdopen()通过文件描述符打开文件
- FILE * fdopen (int fd, const char *mode);
- 3.fclose()关闭文件
- int fclose (FILE *stream);
- 4.fcloseall()关闭所有文件
- int fcloseall (void);
- 5.fgetc()读取单个字符
- int fgetc (FILE *stream);
- 6.ungetc()将字符放回流
- int ungetc (int c, FILE *stream);
- 7.fgets()按行读取字符串
- char * fgets (char *str, int size, FILE *stream);
- 8.fread()读取二进制
- size_t fread (void *buf, size_t size, size_t nr,FILE *stream);
- 9.fputc()写入单个字符
- int fputc (int c, FILE *stream);
- 10.fputs()写入字符串
- int fputs (const char *str, FILE *stream);
- 11.fwrite()写入二进制数据
- size_t fwrite (void *buf,size_t size,size_t nr,FILE *stream);
- 12.定位流
- fseek()函数
- int fseek (FILE *stream, long offset, int whence);//将流设置到whence规定的offset处(whence的取值可以是SEEK_SET、SEEK_CUR、SEEK_END)
- fsetpos()函数
- int fsetpos (FILE *stream, fpos_t *pos);//将流设置到pos处
- rewind()函数
- void rewind (FILE *stream);//将流设置到开始位置
- 13.ftell()返回当前流的位置
- long ftell (FILE *stream);
- 14.fgetpos()获得当前流的位置设置到pos中
- int fgetpos (FILE *stream, fpos_t *pos);
- 15.fflush()将数据刷到内核缓冲区中
- int fflush (FILE *stream);
- 16.ferror()检测错误标志
- int ferror (FILE *stream);
- 17.feof()检测文件结尾标志
- int feof (FILE *stream);
- 18.clearerr()清空错误和文件结尾标志
- void clearerr (FILE *stream);
- 19.fileno()获取文件描述符
- int fileno (FILE *stream);
- 20.setvbuf()设置一个指向buf区域size大小的缓冲,mode表示缓冲模式(_IONBF、_IOLBF、_IOFBF)
- int setvbuf (FILE *stream, char *buf, int mode,size_t size);
- 21.flockfile()文件加锁
- void flockfile (FILE *stream);
- 22.funlockfile()、ftrylockfile()减少与流相关的锁计数
- void funlockfile (FILE *stream);
- int ftrylockfile (FILE *stream);
- 23.不加锁函数
- int fgetc_unlocked (FILE *stream);
- char *fgets_unlocked (char *str, int size, FILE *stream);
- size_t fread_unlocked (void *buf, size_t size,size_t nr,FILE *stream);
- int fputc_unlocked (int c, FILE *stream);
- int fputs_unlocked (const char *str, FILE *stream);
- size_t fwrite_unlocked (void *buf, size_t size,size_t nr,FILE *stream);
- int fflush_unlocked (FILE *stream);
- int feof_unlocked (FILE *stream);
- int ferror_unlocked (FILE *stream);
- int fileno_unlocked (FILE *stream);
- void clearerr_unlocked (FILE *stream);
0 0
- 缓冲输入输出
- 缓冲输入输出
- 缓冲输入输出
- 输入输出流缓冲
- 缓冲输入输出流
- 文件缓冲输入输出对比
- 三、缓冲输入输出
- C 输入输出 读取 回显 缓冲
- 输入输出缓冲流重定向
- JAVA Io 缓冲输入输出流
- IO(2) 缓冲字节输入输出流
- 基于缓冲字符输入输出流复制文本文件
- Linux输入输出的I/O缓冲
- 自己做的一个输入输出缓冲池
- 使用缓冲输入输出字节流拷贝图片
- java---缓冲输入输出流BufferedInputStream和BufferedOutputStream
- 缓冲输入输出流实现用户登录注册
- java---IO流缓冲输入输出流
- 欢迎使用CSDN-markdown编辑器
- 核心动画(Core Animation)
- smartupload组件上传文件
- 文章标题
- mvn
- 缓冲输入输出
- 2015.6.28开始写博客记录cocos2dx学习历程
- Python游戏之Trivia游戏
- hdoj1422_重温世界杯(dp)
- 设计模式学习笔记九:原型模式(和深浅复制)
- [leetcode] 97.Interleaving String
- 修改Eclipse注释模板
- MyEclipse搭建spring MVC+Hibernate
- 10.Tomcat删除项目时,删除那些文件或文件夹?