1 #include <fcntl.h>
2 
creat(const char * path,mode_t mode)3 int creat(const char* path, mode_t mode) {
4     return open(path, O_CREAT | O_WRONLY | O_TRUNC, mode);
5 }
6