Searches in :class:`umbra.components.factory.script_editor.script_editor.ScriptEditor` class editors files.

        :param files: Editor files.
        :type files: list
424172
def __search_editors_files(self, files):
        

        for file in files:
            if self.__interrupt:
                return

            if foundations.io.is_readable(file):
                if foundations.io.is_binary_file(file):
                    continue

            LOGGER.info("{0} | Searching '{1}' file!".format(self.__class__.__name__, file))
            editor = self.__container.script_editor.get_editor(file)
            if not editor:
                continue

            self.__lock.lock()
            occurrences = self.__search_document(editor.document(), self.__pattern, self.__settings)
            self.__lock.unlock()
            occurrences and self.__search_results.append(SearchResult(file=file,
                                                                      pattern=self.__pattern,
                                                                      settings=self.__settings,
                                                                      occurrences=occurrences))
405471
def read (self, files):
        
        assert isinstance(files, list), "Invalid file list %r" % files
        try:
            self.read_ok = super(LCConfigParser, self).read(files)
            if len(self.read_ok) < len(files):
                failed_files = set(files) - set(self.read_ok)
                log.warn(LOG_CHECK, "Could not read configuration files %s.", failed_files)
            # Read all the configuration parameters from the given files.
            self.read_checking_config()
            self.read_authentication_config()
            self.read_filtering_config()
            self.read_output_config()
            self.read_plugin_config()
        except Exception as msg:
            raise LinkCheckerError(
              _("Error parsing configuration: %s") % unicode(msg))
529009
def _format_files(cls, files, kind):
        ''''''
        lines = []
        if files:
            lines.append('The following {kind} are contained in this DAP:'.format(kind=kind.title()))
            for f in files:
                lines.append('* ' + strip_prefix(f, kind).replace(os.path.sep, ' ').strip())
            return lines
        else:
            return ['No {kind} are contained in this DAP'.format(kind=kind.title())]
592416
public static final Index indexAllClasses(final List<File> classFiles) {
        final Indexer indexer = new Indexer();
        indexAllClasses(indexer, classFiles);
        return indexer.complete();
    }
973772
private void openUploadWithFiles(JavaScriptObject files) {

        JsArray<CmsFileInfo> cmsFiles = files.cast();
        List<CmsFileInfo> fileObjects = new ArrayList<CmsFileInfo>();
        for (int i = 0; i < cmsFiles.length(); ++i) {
            fileObjects.add(cmsFiles.get(i));
        }
        CmsDialogUploadButtonHandler buttonHandler = new CmsDialogUploadButtonHandler(
            new Supplier<I_CmsUploadContext>() {

                /**
                 * @see com.google.common.base.Supplier#get()
                 */
                public I_CmsUploadContext get() {

                    return new I_CmsUploadContext() {

                        public void onUploadFinished(List<String> uploadedFiles) {

                            uploadFinished(uploadedFiles);
                        }

                    };
                }
            });
        buttonHandler.setIsTargetRootPath(true);
        buttonHandler.setTargetFolder(getState().getTargetFolderRootPath());
        buttonHandler.openDialogWithFiles(fileObjects);
    }
315393
def __search(self):
        

        self.__search_results = []

        editorsFiles = self.__container.default_target in self.__location.targets and \
                       [editor.file for editor in self.__container.script_editor.list_editors()] or []
        self.__search_editors_files(editorsFiles)

        self.__search_files(self.__location.files)

        for directory in self.__location.directories:
            if self.__interrupt:
                return

            files_walker = foundations.walkers.files_walker(directory,
                                                            self.__location.filters_in,
                                                            list(itertools.chain(self.__location.filters_out,
                                                                                 self.__location.files,
                                                                                 editorsFiles)))
            self.__search_files(files_walker)

        not self.__interrupt and self.searchFinished.emit(self.__search_results)
326499
def search_script_directory(self, path):
        
        for subdir, dirs, files in os.walk(path):
            for file_name in files:
                if file_name.endswith(".py"):
                    self.search_script_file(subdir, file_name)
853837
private void scan(List<File> files, List<T> factories) {
    for (File jar : files) {
      try {
        URL extensionURL = jar.toURI().toURL();
        String jarPath = extensionURL.toString();

        ClassLoader extensionsClassLoader = new ExtensionsClassLoader(new URL[] {extensionURL},
            ClassLoader.getSystemClassLoader());
        ServiceLoader<T> extensionServiceLoader =
            ServiceLoader.load(mFactoryClass, extensionsClassLoader);
        for (T factory : extensionServiceLoader) {
          LOG.debug("Discovered a factory implementation {} - {} in jar {}", factory.getClass(),
              factory, jarPath);
          register(factory, factories);
        }
      } catch (Throwable t) {
        LOG.warn("Failed to load jar {}: {}", jar, t.toString());
      }
    }
  }
952661
def ScanFiles(theFile, target, paths, file_tests, file_tests_search, env, graphics_extensions, targetdir, aux_files):
    

    content = theFile.get_text_contents()
    if Verbose:
        print(" scanning ",str(theFile))

    for i in range(len(file_tests_search)):
        if file_tests[i][0] is None:
            if Verbose:
                print("scan i ",i," files_tests[i] ",file_tests[i], file_tests[i][1])
            file_tests[i][0] = file_tests_search[i].search(content)
            if Verbose and file_tests[i][0]:
                print("   found match for ",file_tests[i][1][-1])
            # for newglossary insert the suffixes in file_tests[i]
            if file_tests[i][0] and file_tests[i][1][-1] == 'newglossary':
                findresult = file_tests_search[i].findall(content)
                for l in range(len(findresult)) :
                    (file_tests[i][1]).insert(0,'.'+findresult[l][3])
                    (file_tests[i][1]).insert(0,'.'+findresult[l][2])
                    (file_tests[i][1]).insert(0,'.'+findresult[l][0])
                    suffix_list = ['.'+findresult[l][0],'.'+findresult[l][2],'.'+findresult[l][3] ]
                    newglossary_suffix.append(suffix_list)
                if Verbose:
                    print(" new suffixes for newglossary ",newglossary_suffix)


    incResult = includeOnly_re.search(content)
    if incResult:
        aux_files.append(os.path.join(targetdir, incResult.group(1)))
    if Verbose:
        print("\include file names : ", aux_files)
    # recursively call this on each of the included files
    inc_files = [ ]
    inc_files.extend( include_re.findall(content) )
    if Verbose:
        print("files included by '%s': "%str(theFile),inc_files)
    # inc_files is list of file names as given. need to find them
    # using TEXINPUTS paths.

    for src in inc_files:
        srcNode = FindFile(src,['.tex','.ltx','.latex'],paths,env,requireExt=False)
        if srcNode is not None:
            file_tests = ScanFiles(srcNode, target, paths, file_tests, file_tests_search, env, graphics_extensions, targetdir, aux_files)
    if Verbose:
        print(" done scanning ",str(theFile))
    return file_tests
289253
private void openUploadWithFiles(JavaScriptObject files) {

        JsArray<CmsFileInfo> cmsFiles = files.cast();
        List<CmsFileInfo> fileObjects = new ArrayList<CmsFileInfo>();
        for (int i = 0; i < cmsFiles.length(); ++i) {
            fileObjects.add(cmsFiles.get(i));
        }
        ((CmsDialogUploadButtonHandler)m_uploadButton.getButtonHandler()).openDialogWithFiles(fileObjects);
    }
799629
public static void writeFileList(Iterable<File> files, CharSink sink) throws IOException {
    writeUnixLines(FluentIterable.from(files)
        .transform(toAbsolutePathFunction()), sink);
  }
1077847
def __search_files(self, files):
        

        for file in files:
            if self.__interrupt:
                return

            if not foundations.common.path_exists(file):
                continue

            if foundations.io.is_readable(file):
                if foundations.io.is_binary_file(file):
                    continue

            LOGGER.info("{0} | Searching '{1}' file!".format(self.__class__.__name__, file))
            cache_data = self.__container.files_cache.get_content(file)
            if not cache_data:
                reader = foundations.io.File(file)
                content = reader.read()
                if content is None:
                    LOGGER.warning("!> Error occured while reading '{0}' file proceeding to next one!".format(file))
                    continue
                self.__container.files_cache.add_content(**{file: CacheData(content=content, document=None)})
            else:
                content = cache_data.content
            occurrences = self.__search_document(QTextDocument(QString(content)), self.__pattern, self.__settings)
            occurrences and self.__search_results.append(SearchResult(file=file,
                                                                      pattern=self.__pattern,
                                                                      settings=self.__settings,
                                                                      occurrences=occurrences))
167363
private String[] list(File file) {
        String[] files = (String[]) fileListMap.get(file);
        if (files == null) {
            files = file.list();
            if (files != null) {
                fileListMap.put(file, files);
            }
        }
        return files;
    }
510527
def files(self, paths, access=None, extensions=None,
              minsize=None, recursion=False):
        
        self.__init__()
        self.access = access
        self.filetype = 'file'
        self.extensions = extensions
        self.minsize = minsize
        self.paths = paths
        self.recursion = recursion

        return _sorter(self._generator_file())
140417
public ClassFinder add(Collection<File> files) {
    for (File file : files)
      add(file);

    return this;
  }

  /**
   * Clear the finder's notion of where to search.
   */
  public void clear() {
    placesToSearch.clear();
  }

  public ClassFinder setErrorIfResultEmpty(boolean errorIfResultEmpty) {
    this.errorIfResultEmpty = errorIfResultEmpty;
    return this;
  }

  /**
   * Find all classes in the search areas, implicitly accepting all of
   * them.
   *
   * @return Collection of found classes
   */
  public Collection<ClassInfo> findClasses() {
    return findClasses(null);
  }

  /**
   * Search all classes in the search areas, keeping only those that
   * pass the specified filter.
   *
   * @param filter  the filter, or null for no filter
   * @return Collection of found classes
   */
  public Collection<ClassInfo> findClasses(ClassFilter filter) {
    Map<String,ClassInfo> foundClasses = new ParallelClassLoader().loadClassesFrom(placesToSearch.values());
    log.info("Loaded " + foundClasses.size() + " classes.");

    Collection<ClassInfo> filteredClasses = filterClasses(filter, foundClasses);

    if (filteredClasses.size() == 0 && errorIfResultEmpty) {
      log.warn("Found no classes, throwing exception");
      throw new ClassFinderException("Didn't find any classes");
    } else {
      log.info("Returning " + filteredClasses.size() + " total classes");
    }
    foundClasses.clear();
    return filteredClasses;
  }

  private Collection<ClassInfo> filterClasses(ClassFilter filter, Map<String, ClassInfo> foundClasses) {
    Collection<ClassInfo> classes = new ArrayList<>();
    for (ClassInfo classInfo : foundClasses.values()) {
      String className = classInfo.getClassName();
      String locationName = classInfo.getClassLocation().getPath();
      log.trace("Looking at " + locationName + " (" + className + ")");
      if ((filter == null) || (filter.accept(classInfo, new ClassHierarchyResolver(foundClasses)))) {
        log.trace("Filter accepted " + className);
        classes.add(classInfo);
      } else {
        log.trace("Filter rejected " + className);
      }
    }
    return classes;
  }
}
513775
def files_type(fs0, fs1, files):
    """"""
    for file_meta in files['deleted_files']:
        file_meta['type'] = fs0.file(file_meta['path'])
    for file_meta in files['created_files'] + files['modified_files']:
        file_meta['type'] = fs1.file(file_meta['path'])

    return files
478577
private void listFiles(File dir, List<File> results) {
        File[] found = dir.listFiles();
        if ( found != null ) {
            for ( File f : found ) {
                if (f.isDirectory()) {
                	//do nothing
                } else {
                    results.add(f);
                }
            }
        }
    }