Detecting the type of a BkFileBase

A BkFileBase has a member named posixFileMode. This member can be passed to one of the macros in this section to figure out whether it's a directory, a regular file, or a symbolic link. Examples are given to illustrate how to use the macros.

IS_DIR()

    if(IS_DIR(base->posixFileMode))
    {
        /* base is a directory, and can be cast to one */
    }

IS_REG_FILE()

    if(IS_REG_FILE(base->posixFileMode))
    {
        /* base is a regular file, and can be cast to one */
    }

IS_SYMLINK()

    if(IS_SYMLINK(base->posixFileMode))
    {
        /* base is a symbolic link, and can be cast to one */
    }