creat.c 137 B

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