C库
fcntl.h
#include <fcntl.h> int open(const char *pathname, int oflag, ... /* mode_t mode */); int create(const char *pathname, mode_t mode); int fcntl(int filedes, int cmd, ... /* int arg */);
string.h
#include <string.h> /** * 此函数将 errnum (它通常就是errno的值)映射为一个出错信息字符串,并且返回此字符串的指针。 */ char *strerror(int errnum); /** * perror函数基于errno的当前值,在标准出错上产生一条出错消息,然后返回。 */ void perror(const char *msg);
unistd.h
#include <unistd.h> long sysconf(int name); long pathconf(const char *pathname, int name); long fpathconf(int filedes, int name); int close(int filedes); off_t lseek(int filedes, off_t offset, int whence); ssize_t read(int filedes, void *buf, size_t nbytes); ssize_t write(int filedes, const void *buf, size_t nbytes); ssize_t pread(int filedes, void *buf, size_t nbytes, off_t offset); ssize_t pread(int filedes, const void *buf, size_t nbytes, off_t offset); int dup(int filedes); int dup2(int filedes, int filedes2); int fsync(int filedes); int fdatasync(int filedes); void sync(void);
sys/stat.h
#include <sys/stat.h> int stat(const char *restrict pathname, struct stat *restrict buf); int fstat(int filedes, struct stat *buf); int lstat(const char *restrict pathname, struct stat *restrict buf);
昵称:深空/螃蟹