def _get_all_files_in_directory(dir_path, excluded_glob_patterns):
 files_in_directory = []
 for (_dir, _, files) in os.walk(dir_path):
  for file_name in files:
   filename = os.path.relpath(os.path.join(_dir, file_name), os.getcwd())
   if (not any([fnmatch.fnmatch(filename, gp) for gp in excluded_glob_patterns])):
    files_in_directory.append(filename)
 return files_in_directory

def _get_all_files_in_directory ( dir_path , excluded_glob_patterns ) : files_in_directory = [ ] for ( _dir , _ , files ) in os . walk ( dir_path ) : for file_name in files : filename = os . path . relpath ( os . path . join ( _dir , file_name ) , os . getcwd ( ) ) if ( not any ( [ fnmatch . fnmatch ( filename , gp ) for gp in excluded_glob_patterns ] ) ) : files_in_directory . append ( filename ) return files_in_directory
recursively collects all files in directory and subdirectories of specified path .