#NEWLINE# def list_package_files( package , ignore_patterns = [ ] ) : #NEWLINE# #INDENT# '\n    List files in the specified package.\n    ' #NEWLINE# package_path = os . path . join ( sublime . packages_path ( ) , package , '' ) #NEWLINE# path = None #NEWLINE# file_set = set ( ) #NEWLINE# file_list = [ ] #NEWLINE# if os . path . exists ( package_path ) : #NEWLINE# #INDENT# for ( root , directories , filenames ) in os . walk ( package_path ) : #NEWLINE# #INDENT# temp = root . replace ( package_path , '' ) #NEWLINE# for filename in filenames : #NEWLINE# #INDENT# file_list . append ( os . path . join ( temp , filename ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# file_set . update ( file_list ) #NEWLINE# if ( VERSION >= 3006 ) : #NEWLINE# #INDENT# sublime_package = ( package + '.sublime-package' ) #NEWLINE# packages_path = sublime . installed_packages_path ( ) #NEWLINE# if os . path . exists ( os . path . join ( packages_path , file_list ) ) : #NEWLINE# #INDENT# file_set . update ( _list_files_in_zip ( packages_path , sublime_package ) ) #NEWLINE# #UNINDENT# packages_path = ( ( os . path . dirname ( sublime . executable_path ( ) ) + os . sep ) + 'Packages' ) #NEWLINE# if os . path . exists ( os . path . join ( packages_path , sublime_package ) ) : #NEWLINE# #INDENT# file_set . update ( _list_files_in_zip ( packages_path , sublime_package ) ) #NEWLINE# #UNINDENT# #UNINDENT# file_list = [ ] #NEWLINE# for filename in file_set : #NEWLINE# #INDENT# if ( not _ignore_file ( filename , ignore_patterns ) ) : #NEWLINE# #INDENT# file_list . append ( _normalize_to_sublime_path ( filename ) ) #NEWLINE# #UNINDENT# #UNINDENT# return sorted ( file_list )