Tenok
A Linux-like Real-Time Operating System for Robotics and Internet of Things
Data Structures | Macros | Functions
stat.h File Reference
#include <sys/types.h>
Include dependency graph for stat.h:

Go to the source code of this file.

Data Structures

struct  stat
 

Macros

#define S_IFIFO   0 /* FIFO */
 
#define S_IFCHR   1 /* Character device */
 
#define S_IFBLK   2 /* Block device */
 
#define S_IFREG   3 /* Regular file */
 
#define S_IFDIR   4 /* Directory */
 

Functions

int fstat (int fd, struct stat *statbuf)
 Return information about a file, in the buffer pointed to by statbuf. More...
 
int mknod (const char *pathname, mode_t mode, dev_t dev)
 Create a filesystem node (file, device special file, or named pipe) named pathname, with attributes specified by mode and dev. More...
 
int mkfifo (const char *pathname, mode_t mode)
 Makes a FIFO special file with name pathname. More...
 

Function Documentation

◆ fstat()

int fstat ( int  fd,
struct stat statbuf 
)

Return information about a file, in the buffer pointed to by statbuf.

Parameters
fdThe file descriptor to provide.
Return values
int0 on success and nonzero error number on error.

◆ mkfifo()

int mkfifo ( const char *  pathname,
mode_t  mode 
)

Makes a FIFO special file with name pathname.

Parameters
pathnameThe path name to create the new fifo file.
modeNot used.
Return values
int0 on success and nonzero error number on error.

◆ mknod()

int mknod ( const char *  pathname,
mode_t  mode,
dev_t  dev 
)

Create a filesystem node (file, device special file, or named pipe) named pathname, with attributes specified by mode and dev.

Parameters
pathnameThe pathname to create the new file.
modeNot used.
devThe file type to provide (S_IFIFO, S_IFCHR, ...).
Return values
int0 on success and nonzero error number on error.