Luna/libc/include/fcntl.h

33 lines
699 B
C
Raw Permalink Normal View History

/* fcntl.h: File control. */
#ifndef _FCNTL_H
#define _FCNTL_H
#include <bits/atfile.h>
#include <bits/fcntl.h>
#include <bits/open-flags.h>
2023-03-23 18:24:47 +00:00
#include <sys/types.h>
#ifdef __cplusplus
extern "C"
{
#endif
/* Open a file path and return a file descriptor to it. */
2023-03-12 15:55:46 +00:00
int open(const char* path, int flags, ...);
/* Open a file path relative to a file descriptor and return a file descriptor to it. */
int openat(int dirfd, const char* path, int flags, ...);
2023-03-19 18:21:36 +00:00
/* Create a file and return a file descriptor to it. */
int creat(const char* path, mode_t mode);
/* Perform a file control operation. */
int fcntl(int fd, int cmd, ...);
#ifdef __cplusplus
}
#endif
#endif