static int link_is_dir (const char *path)
static int link_is_dir (const char *folder, const char *path)
static int link_is_dir (const char *path){  struct stat st;  if (stat (path, &st) == 0)    return (S_ISDIR (st.st_mode));  else    return (-1);}