2023-12-21 15:32:27 -07:00
|
|
|
/* libfileis functions return true if the condition is true and false if the
|
2023-12-21 14:55:00 -07:00
|
|
|
* condition is false. Returned values are 0 or 1 only. */
|
|
|
|
|
|
|
|
/* True if file exists and is a block special file. */
|
|
|
|
int f_blockspecial(char *path);
|
|
|
|
|
|
|
|
/* True if file exists and is a character special file. */
|
|
|
|
int f_charspecial(char *path);
|
|
|
|
|
|
|
|
/* True if file exists and is a directory. */
|
|
|
|
int f_directory(char *path);
|
|
|
|
|
|
|
|
/* True if file exists and is executable. */
|
|
|
|
int f_executable(char *path);
|
|
|
|
|
|
|
|
/* True if file exists (regardless of type). */
|
|
|
|
int f_exists(char *path);
|
|
|
|
|
|
|
|
/* True if file exists and is a named pipe (FIFO). */
|
|
|
|
int f_fifospecial(char *path);
|
|
|
|
|
|
|
|
/* True if file exists and its set group ID flag is set. */
|
|
|
|
int f_gid(char *path);
|
|
|
|
|
|
|
|
/* True if file exists and is readable. */
|
|
|
|
int f_readable(char *path);
|
|
|
|
|
|
|
|
/* True if file exists and is a regular file. */
|
|
|
|
int f_regular(char *path);
|
|
|
|
|
|
|
|
/* True if file exists and is a socket. */
|
|
|
|
int f_socket(char *path);
|
|
|
|
|
|
|
|
/* True if file exists and its sticky bit is set. */
|
|
|
|
int f_sticky(char *path);
|
|
|
|
|
|
|
|
/* True if file exists and is a symbolic link. */
|
|
|
|
int f_symlink(char *path);
|
|
|
|
|
|
|
|
/* True if file exists and its set user ID flag is set. */
|
|
|
|
int f_uid(char *path);
|
|
|
|
|
|
|
|
/* True if file exists and is writeable. */
|
|
|
|
int f_writeable(char *path);
|