コード例 #1
0
 def find_files(self, paths, file_pattern, exclusion):
     all_files = []
     for path in paths:
         all_files.extend(rglob(path, file_pattern))
     if exclusion != '':
         self.files = [item for item in all_files if exclusion not in item]
     else:
         self.files = all_files
コード例 #2
0
    def show_files(self, path, file_pattern='\.' + JS_EXTENSIONS + '$'):
        self.files = rglob(path, file_pattern)

        view = self.window.active_view()
        if view:
            current_file = view.file_name()
            if self.is_listing_current_file_group(current_file):
                self.remove_from_list(current_file)
            else:
                self.move_related_files_to_top(current_file)

        start_index = len(path) + 1
        # Need to add a couple of spaces to avoid getting the file names cut off
        relative_paths = map(lambda x: x[start_index:] + '  ', self.files)

        self.window.show_quick_panel(relative_paths, self.file_selected)
コード例 #3
0
 def find_files(self, paths, file_pattern):
     self.files = []
     for path in paths:
         self.files.extend(rglob(path, file_pattern))
コード例 #4
0
 def find_files(self, paths, file_pattern):
     self.files = []
     for path in paths:
         self.files.extend(rglob(path, file_pattern))