![]() |
posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
|
POSIX file status types and functions (<sys/stat.h>) More...


Go to the source code of this file.
Data Structures | |
| struct | timespec |
| Time value with nanosecond resolution. More... | |
| struct | stat |
| File status information returned by stat(), fstat(), and lstat(). More... | |
Macros | |
| #define | _BLKCNT_T_DECLARED |
| #define | __blkcnt_t_defined |
| #define | _BLKSIZE_T_DECLARED |
| #define | __blksize_t_defined |
| #define | _DEV_T_DECLARED |
| #define | __dev_t_defined |
| #define | _GID_T_DECLARED |
| #define | __gid_t_defined |
| #define | _INO_T_DECLARED |
| #define | __ino_t_defined |
| #define | _MODE_T_DECLARED |
| #define | __mode_t_defined |
| #define | _NLINK_T_DECLARED |
| #define | __nlink_t_defined |
| #define | _OFF_T_DECLARED |
| #define | __off_t_defined |
| #define | _TIMESPEC_DECLARED |
| #define | __timespec_defined |
| #define | _UID_T_DECLARED |
| #define | __uid_t_defined |
| #define | _STAT_DECLARED |
| #define | __stat_defined |
| #define | S_IFMT ZVFS_MODE_IFMT |
| Bit mask for the file type bits in st_mode. | |
| #define | S_IFBLK ZVFS_MODE_IFBLK |
| Block special file. | |
| #define | S_IFCHR ZVFS_MODE_IFCHR |
| Character special file. | |
| #define | S_IFIFO ZVFS_MODE_IFIFO |
| FIFO special file. | |
| #define | S_IFREG ZVFS_MODE_IFREG |
| Regular file. | |
| #define | S_IFDIR ZVFS_MODE_IFDIR |
| Directory. | |
| #define | S_IFLNK ZVFS_MODE_IFLNK |
| Symbolic link. | |
| #define | S_IFSOCK ZVFS_MODE_IFSOCK |
| Socket. | |
| #define | S_IFSHM ZVFS_MODE_IFSHM |
| Shared memory object (Zephyr extension). | |
| #define | S_IRWXU ZVFS_S_IRWXU |
| Read, write, execute permission for owner. | |
| #define | S_IRUSR ZVFS_S_IRUSR |
| Read permission for owner. | |
| #define | S_IWUSR ZVFS_S_IWUSR |
| Write permission for owner. | |
| #define | S_IXUSR ZVFS_S_IXUSR |
| Execute permission for owner. | |
| #define | S_IRWXG ZVFS_S_IRWXG |
| Read, write, execute permission for group. | |
| #define | S_IRGRP ZVFS_S_IRGRP |
| Read permission for group. | |
| #define | S_IWGRP ZVFS_S_IWGRP |
| Write permission for group. | |
| #define | S_IXGRP ZVFS_S_IXGRP |
| Execute permission for group. | |
| #define | S_IRWXO ZVFS_S_IRWXO |
| Read, write, execute permission for others. | |
| #define | S_IROTH ZVFS_S_IROTH |
| Read permission for others. | |
| #define | S_IWOTH ZVFS_S_IWOTH |
| Write permission for others. | |
| #define | S_IXOTH ZVFS_S_IXOTH |
| Execute permission for others. | |
| #define | S_ISUID ZVFS_S_ISUID |
| Set-user-ID bit. | |
| #define | S_ISGID ZVFS_S_ISGID |
| Set-group-ID bit. | |
| #define | S_ISVTX ZVFS_S_ISVTX |
| Sticky bit (restricted deletion). | |
| #define | S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) |
Test whether m is a block special file. | |
| #define | S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) |
Test whether m is a character special file. | |
| #define | S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) |
Test whether m is a directory. | |
| #define | S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) |
Test whether m is a FIFO. | |
| #define | S_ISREG(m) (((m) & S_IFMT) == S_IFREG) |
Test whether m is a regular file. | |
| #define | S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) |
Test whether m is a symbolic link. | |
| #define | S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) |
Test whether m is a socket. | |
| #define | S_TYPEISMQ(buf) (0) |
| Test whether the file is a message queue (always 0). | |
| #define | S_TYPEISSEM(buf) (0) |
| Test whether the file is a semaphore (always 0). | |
| #define | S_TYPEISSHM(st) (((st)->st_mode & S_IFMT) == S_IFSHM) |
| Test whether the file is a shared memory object. | |
| #define | S_TYPEISTMO(buf) (0) |
| Test whether the file is a typed memory object (always 0). | |
| #define | UTIME_NOW -1 |
| Set st_atim or st_mtim to the current time (utimensat flag). | |
| #define | UTIME_OMIT -2 |
| Leave st_atim or st_mtim unchanged (utimensat flag). | |
Typedefs | |
| typedef long | blkcnt_t |
| typedef unsigned long | blksize_t |
| typedef int | dev_t |
| typedef unsigned short | gid_t |
| typedef long | ino_t |
| typedef int | mode_t |
| typedef unsigned short | nlink_t |
| typedef long | off_t |
| typedef unsigned short | uid_t |
Functions | |
| int | chmod (const char *path, mode_t mode) |
| Change the mode of a file. | |
| int | fchmod (int fildes, mode_t mode) |
| Change the mode of an open file. | |
| int | fchmodat (int fd, const char *path, mode_t mode, int flag) |
| Change the mode of a file relative to a directory descriptor. | |
| int | fstat (int fildes, struct stat *buf) |
| Get status of an open file. | |
| int | fstatat (int fd, const char *ZRESTRICT path, struct stat *ZRESTRICT buf, int flag) |
| Get status of a file relative to a directory descriptor. | |
| int | futimens (int fildes, const struct timespec times[2]) |
| Set file access and modification times of an open file (nanosecond resolution). | |
| int | lstat (const char *ZRESTRICT path, struct stat *ZRESTRICT buf) |
| Get status of a file (does not follow symbolic links). | |
| int | mkdir (const char *path, mode_t mode) |
| Create a directory. | |
| int | mkdirat (int fd, const char *path, mode_t mode) |
| Create a directory relative to a directory descriptor. | |
| int | mkfifo (const char *path, mode_t mode) |
| Create a FIFO special file. | |
| int | mkfifoat (int fd, const char *path, mode_t mode) |
| Create a FIFO special file relative to a directory descriptor. | |
| int | mknod (const char *path, mode_t mode, dev_t dev) |
| Create a special or regular file (XSI extension). | |
| int | mknodat (int fd, const char *path, mode_t mode, dev_t dev) |
| Create a special or regular file relative to a directory descriptor (XSI). | |
| TOOLCHAIN_DISABLE_WARNING (TOOLCHAIN_WARNING_SHADOW) | |
| int | stat (const char *ZRESTRICT path, struct stat *ZRESTRICT buf) |
| Get status of a file by path (follows symbolic links). | |
| TOOLCHAIN_ENABLE_WARNING (TOOLCHAIN_WARNING_SHADOW) | |
| mode_t | umask (mode_t cmask) |
| Set the file mode creation mask. | |
| int | utimensat (int fd, const char *path, const struct timespec times[2], int flag) |
| Set file access and modification times relative to a directory descriptor. | |
POSIX file status types and functions (<sys/stat.h>)
Definition in file stat.h.