57 lines
1.4 KiB
C
57 lines
1.4 KiB
C
/* sys/stat.h: stat() routine and friends. */
|
|
|
|
#ifndef _SYS_STAT_H
|
|
#define _SYS_STAT_H
|
|
|
|
#include <bits/modes.h>
|
|
#include <bits/struct_stat.h>
|
|
#include <bits/timespec.h>
|
|
#include <bits/utime.h>
|
|
#include <sys/types.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
/* Create a directory. */
|
|
int mkdir(const char* path, mode_t mode);
|
|
|
|
/* Change the mode bits of a file. */
|
|
int chmod(const char* path, mode_t mode);
|
|
|
|
/* Change the mode bits of a file descriptor. */
|
|
int fchmod(int fd, mode_t mode);
|
|
|
|
#pragma GCC push_options
|
|
#pragma GCC diagnostic ignored "-Wshadow"
|
|
|
|
/* Retrieve information about a file. */
|
|
int stat(const char* path, struct stat* st);
|
|
|
|
#pragma GCC pop_options
|
|
|
|
/* Retrieve information about a file or symbolic link. */
|
|
int lstat(const char* path, struct stat* st);
|
|
|
|
/* Retrieve information about a file. */
|
|
int fstat(int fd, struct stat* st);
|
|
|
|
/* Retrieve information about a file. */
|
|
int fstatat(int dirfd, const char* path, struct stat* st, int flags);
|
|
|
|
/* Change the process's file creation mask. */
|
|
mode_t umask(mode_t mask);
|
|
|
|
/* Change a file's access and modification timestamps, with nanosecond precision. */
|
|
int utimensat(int dirfd, const char* path, const struct timespec times[2], int flags);
|
|
|
|
/* Change a file's access and modification timestamps, with nanosecond precision. */
|
|
int futimens(int fd, const struct timespec times[2], int flags);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|