18 #include <drizzled/internal/my_sys.h>
23 #include <drizzled/error.h>
39 int my_create(
const char *FileName,
int CreateFlags,
int access_flags,
44 #if !defined(NO_OPEN_3)
45 fd = open(FileName, access_flags | O_CREAT,
46 CreateFlags ? CreateFlags : my_umask);
48 fd = open(FileName, access_flags);
51 if ((MyFlags & MY_SYNC_DIR) && (fd >=0) &&
52 my_sync_dir_by_file(FileName, MyFlags))
54 my_close(fd, MyFlags);
58 rc= my_register_filename(fd, FileName, EE_CANTCREATEFILE, MyFlags);
65 if (unlikely(fd >= 0 && rc < 0))
68 my_delete(FileName, MyFlags);
TODO: Rename this file - func.h is stupid.