@SuppressFBWarnings(value="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE",justification="listFiles() is only null if path is not a directory") public static boolean containsProfile(File path){
  if (path.isDirectory()) {
    if (Profile.isProfile(path)) {
      return true;
    }
 else {
      for (      File file : path.listFiles()) {
        if (Profile.containsProfile(file)) {
          return true;
        }
      }
    }
  }
  return false;
}

@ SuppressFBWarnings ( value = "NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE" , justification = "listFiles() is only null if path is not a directory" ) public static boolean containsProfile ( File path ) { if ( path . isDirectory ( ) ) { if ( Profile . isProfile ( path ) ) { return true ; } else { for ( File file : path . listFiles ( ) ) { if ( Profile . containsProfile ( file ) ) { return true ; } } } } return false ; }
test if the given path or subdirectories contains a profile .
