nl: if self.allow_files is true and full_file is a file, or if self.allow_folders is true and full_file is an directory,
code: if ( ( ( self . allow_files and os . path . isfile ( full_file ) ) or ( self . allow_folders and os . path . isdir ( full_file ) ) ) and ( self . match is None or self . match_re . search ( f ) ) ) :