src/xpath/xpath.c
/*
 * Test if a path is a directory
 */
Test if a path is a directory
Test if a path is a directory
int xpath_is_dir(const char * path)
{
    struct stat st;
    memset(&st, 0, sizeof(struct stat));
    stat(path, &st);
    return S_ISDIR(st.st_mode);
}
int xpath_is_dir ( const char * path ) { struct stat st ; memset ( & st , 0 , sizeof ( struct stat ) ) ; stat ( path , & st ) ; return S_ISDIR ( st . st_mode ) ; }
Test if a path is a directory
Test if a path is a directory