15#define S_IFIFO 0010000
16#define S_IFSOCK 0140000
17#define S_IFCHR 0020000
18#define S_IFDIR 0040000
19#define S_IFBLK 0060000
20#define S_IFREG 0100000
21#define S_IFLNK 0120000
23#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
24#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
25#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
26#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
27#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
28#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
29#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
64#define st_atime st_atim.tv_sec
65#define st_mtime st_mtim.tv_sec
66#define st_ctime st_ctim.tv_sec
110#define UTIME_NOW ((1l << 30) - 1)
111#define UTIME_OMIT ((1l << 30) - 2)
uint8_t flags
Definition idt.c:3
int dirfd(DIR *dir)
the file descriptor under a directory stream.
int lstat(const char *path, struct stat *st)
the metadata of a symbolic link itself (stat gives what it points at).
int fchmod(int fd, mode_t mode)
int futimens(int fd, const struct timespec times[2])
int mkdirat(int dirfd, const char *path, mode_t mode)
int mkdir(const char *path, mode_t mode)
create a directory with a mode (taken through the umask).
int fstat(int fd, struct stat *st)
get an open file's metadata (pipes and the console too).
mode_t umask(mode_t mask)
set the mask taken off the mode of new files.
int mknod(const char *path, mode_t mode, dev_t dev)
make a named pipe (S_IFIFO), an empty file (S_IFREG) or, as root, a device node (S_IFCHR,...
int fchmodat(int dirfd, const char *path, mode_t mode, int flags)
int fstatat(int dirfd, const char *path, struct stat *st, int flags)
int chmod(const char *path, mode_t mode)
change the permission bits of a file (owner or root only).
int mkfifo(const char *path, mode_t mode)
make a named pipe (a FIFO): processes that open it share one pipe.
int mkfifoat(int dirfd, const char *path, mode_t mode)
int mknodat(int dirfd, const char *path, mode_t mode, dev_t dev)
int utimensat(int dirfd, const char *path, const struct timespec times[2], int flags)
set a file's access and modification times (times[0], times[1]); with times NULL, both to the time no...
off_t st_size
Definition stat.h:55
nlink_t st_nlink
Definition stat.h:50
blksize_t st_blksize
Definition stat.h:56
blkcnt_t st_blocks
Definition stat.h:57
uid_t st_uid
Definition stat.h:51
mode_t st_mode
Definition stat.h:49
struct timespec st_mtim
Definition stat.h:59
struct timespec st_atim
Definition stat.h:58
struct timespec st_ctim
Definition stat.h:60
ino_t st_ino
Definition stat.h:48
unsigned int __st_pad
Definition stat.h:54
dev_t st_rdev
Definition stat.h:53
gid_t st_gid
Definition stat.h:52
dev_t st_dev
Definition stat.h:47
struct timeval and gettimeofday.
clock_t times(struct tms *buf)
the CPU times of the process and its reaped children.
__INT64_TYPE__ off_t
Definition types.h:20
unsigned int blksize_t
Definition types.h:24
unsigned int uid_t
Definition types.h:17
unsigned int blkcnt_t
Definition types.h:25
unsigned int gid_t
Definition types.h:18
unsigned int dev_t
Definition types.h:22
unsigned int ino_t
Definition types.h:21
unsigned int mode_t
Definition types.h:19
unsigned int nlink_t
Definition types.h:23