嵌入式Linux系统中的文件作用
1.“一点哲学”:一切皆文件
2.linux文件类型:-表示普通文件;
d表示目录文件;
l表示链接文件;
c表示字符设备;
b表示块设备;
p表示管道文件,如FIFO文件;
f表示堆栈文件,如LIFO。
无缓冲访问文件(系统调用)
常用头文件:
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<unistd.h>
#include<erron.h>
...
1.creat函数
定义:int creat ( const char*pathname,mode_tmode );
形参内容:pathname指文件名,mode指用何种方式调用
O_CREAT&#x