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