int fflush (FILE *);
int fsync (int);
区别:
fflush的参数是FILE*,即fopen的返回值,当需要刷新fopen打开的文件缓冲时用fflush;
fsync的参数是int, 即open的返回值,当需要刷新open打开的文件缓冲时用fsync.
int fflush (FILE *);
int fsync (int);
区别:
fflush的参数是FILE*,即fopen的返回值,当需要刷新fopen打开的文件缓冲时用fflush;
fsync的参数是int, 即open的返回值,当需要刷新open打开的文件缓冲时用fsync.