src/findlib/find.c
static int our_callback(JCR *jcr, FF_PKT *ff, bool top_level)
{
   if (top_level) {
      return ff->file_save(jcr, ff, top_level);   /* accept file */
   }
   switch (ff->type) {
   case FT_NOACCESS:
   case FT_NOFOLLOW:
   case FT_NOSTAT:
   case FT_NOCHG:
   case FT_ISARCH:
   case FT_NORECURSE:
   case FT_NOFSCHG:
   case FT_INVALIDFS:
   case FT_INVALIDDT:
   case FT_NOOPEN:
//    return ff->file_save(jcr, ff, top_level);

   /* These items can be filtered */
   case FT_LNKSAVED:
   case FT_REGE:
   case FT_REG:
   case FT_LNK:
   case FT_DIRBEGIN:
   case FT_DIREND:
   case FT_RAW:
   case FT_FIFO:
   case FT_SPEC:
   case FT_DIRNOCHG:
   case FT_REPARSE:
   case FT_JUNCTION:
      if (accept_file(ff)) {
         return ff->file_save(jcr, ff, top_level);
      } else {
         Dmsg1(dbglvl, "Skip file %s\n", ff->fname);
         return -1;                   /* ignore this file */
      }

   default:
      Dmsg1(000, "Unknown FT code %d\n", ff->type);
      return 0;
   }
}
/*
 * The code comes here for each file examined.
 * We filter the files, then call the user's callback if
 *    the file is included.
 */
The code comes here for each file examined.
We filter the files, then call the user's callback if
the file is included.
The code comes here for each file examined . We filter the files then call the user ' s callback if the file is included .
static int our_callback(JCR *jcr, FF_PKT *ff, bool top_level)
{
   if (top_level) {
      return ff->file_save(jcr, ff, top_level);   
   }
   switch (ff->type) {
   case FT_NOACCESS:
   case FT_NOFOLLOW:
   case FT_NOSTAT:
   case FT_NOCHG:
   case FT_ISARCH:
   case FT_NORECURSE:
   case FT_NOFSCHG:
   case FT_INVALIDFS:
   case FT_INVALIDDT:
   case FT_NOOPEN:
   case FT_LNKSAVED:
   case FT_REGE:
   case FT_REG:
   case FT_LNK:
   case FT_DIRBEGIN:
   case FT_DIREND:
   case FT_RAW:
   case FT_FIFO:
   case FT_SPEC:
   case FT_DIRNOCHG:
   case FT_REPARSE:
   case FT_JUNCTION:
      if (accept_file(ff)) {
         return ff->file_save(jcr, ff, top_level);
      } else {
         Dmsg1(dbglvl, "Skip file %s\n", ff->fname);
         return -1;                   
      }
   default:
      Dmsg1(000, "Unknown FT code %d\n", ff->type);
      return 0;
   }
}
static int our_callback ( JCR * jcr , FF_PKT * ff , bool top_level ) { if ( top_level ) { return ff -> file_save ( jcr , ff , top_level ) ; } switch ( ff -> type ) { case FT_NOACCESS : case FT_NOFOLLOW : case FT_NOSTAT : case FT_NOCHG : case FT_ISARCH : case FT_NORECURSE : case FT_NOFSCHG : case FT_INVALIDFS : case FT_INVALIDDT : case FT_NOOPEN : case FT_LNKSAVED : case FT_REGE : case FT_REG : case FT_LNK : case FT_DIRBEGIN : case FT_DIREND : case FT_RAW : case FT_FIFO : case FT_SPEC : case FT_DIRNOCHG : case FT_REPARSE : case FT_JUNCTION : if ( accept_file ( ff ) ) { return ff -> file_save ( jcr , ff , top_level ) ; } else { Dmsg1 ( dbglvl , " \n " , ff -> fname ) ; return -1 ; } default : Dmsg1 ( 000 , " \n " , ff -> type ) ; return 0 ; } }
The code comes here for each file examined.
The code comes here for each file examined .
/* accept file */ //    return ff->file_save(jcr, ff, top_level); /* These items can be filtered */ /* ignore this file */