1 #ifndef XCHECK_PATH_EXISTS_H 2 #define XCHECK_PATH_EXISTS_H 7 #define TYPE_DIR S_IFDIR 8 #define TYPE_REG S_IFREG 9 #define TYPE_LNK S_IFLNK 11 #define TYPE_SOC S_IFSOCK 12 #define TYPE_FIF S_IFIFO 13 #define TYPE_CDEV S_IFCHR 14 #define TYPE_BDEV S_IFBLK 16 #define TYPE_DEV (TYPE_BDEV | TYPE_CDEV) 17 #define TYPE_NODIR (TYPE_REG | TYPE_LNK | TYPE_SOC | TYPE_FIF | TYPE_DEV) 23 #define PATH_NOCHECK 0 28 #define check_file_exists(file, mode) check_path_exists(file, S_IFREG, mode) 33 #define check_dir_exists(dir, mode) check_path_exists(dir, S_IFDIR, mode) int check_path_exists(const char *path, mode_t type, mode_t mode)