Find source files.
776627
def source_files(mongodb_path):
    """"""
    for root, dirs, files in os.walk(mongodb_path):
        for filename in files:
            # skip files in dbtests folder
            if 'dbtests' in root:
                continue
            if filename.endswith(('.cpp', '.c', '.h')):
                yield os.path.join(root, filename)
36479
def build_source_files(self):
        """"""

        from .files import BuildSourceFileAccessor
        return BuildSourceFileAccessor(self, self.dataset, self.source_fs)
1167505
function findSourceFile(fileName, path, isDefaultLib, isReference, refFile, refPos, refEnd) {
            if (filesByName.contains(path)) {
                var file_1 = filesByName.get(path);
                // try to check if we've already seen this file but with a different casing in path
                // NOTE: this only makes sense for case-insensitive file systems
                if (file_1 && options.forceConsistentCasingInFileNames && ts.getNormalizedAbsolutePath(file_1.fileName, currentDirectory) !== ts.getNormalizedAbsolutePath(fileName, currentDirectory)) {
                    reportFileNamesDifferOnlyInCasingError(fileName, file_1.fileName, refFile, refPos, refEnd);
                }
                // If the file was previously found via a node_modules search, but is now being processed as a root file,
                // then everything it sucks in may also be marked incorrectly, and needs to be checked again.
                if (file_1 && sourceFilesFoundSearchingNodeModules[file_1.path] && currentNodeModulesDepth == 0) {
                    sourceFilesFoundSearchingNodeModules[file_1.path] = false;
                    if (!options.noResolve) {
                        processReferencedFiles(file_1, ts.getDirectoryPath(fileName), isDefaultLib);
                        processTypeReferenceDirectives(file_1);
                    }
                    modulesWithElidedImports[file_1.path] = false;
                    processImportedModules(file_1, ts.getDirectoryPath(fileName));
                }
                else if (file_1 && modulesWithElidedImports[file_1.path]) {
                    if (currentNodeModulesDepth < maxNodeModulesJsDepth) {
                        modulesWithElidedImports[file_1.path] = false;
                        processImportedModules(file_1, ts.getDirectoryPath(fileName));
                    }
                }
                return file_1;
            }
            // We haven't looked for this file, do so now and cache result
            var file = host.getSourceFile(fileName, options.target, function (hostErrorMessage) {
                if (refFile !== undefined && refPos !== undefined && refEnd !== undefined) {
                    fileProcessingDiagnostics.add(ts.createFileDiagnostic(refFile, refPos, refEnd - refPos, ts.Diagnostics.Cannot_read_file_0_Colon_1, fileName, hostErrorMessage));
                }
                else {
                    fileProcessingDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_read_file_0_Colon_1, fileName, hostErrorMessage));
                }
            });
            filesByName.set(path, file);
            if (file) {
                sourceFilesFoundSearchingNodeModules[path] = (currentNodeModulesDepth > 0);
                file.path = path;
                if (host.useCaseSensitiveFileNames()) {
                    // for case-sensitive file systems check if we've already seen some file with similar filename ignoring case
                    var existingFile = filesByNameIgnoreCase.get(path);
                    if (existingFile) {
                        reportFileNamesDifferOnlyInCasingError(fileName, existingFile.fileName, refFile, refPos, refEnd);
                    }
                    else {
                        filesByNameIgnoreCase.set(path, file);
                    }
                }
                skipDefaultLib = skipDefaultLib || file.hasNoDefaultLib;
                var basePath = ts.getDirectoryPath(fileName);
                if (!options.noResolve) {
                    processReferencedFiles(file, basePath, isDefaultLib);
                    processTypeReferenceDirectives(file);
                }
                // always process imported modules to record module name resolutions
                processImportedModules(file, basePath);
                if (isDefaultLib) {
                    files.unshift(file);
                }
                else {
                    files.push(file);
                }
            }
            return file;
        }
1051314
def iter_source_code(paths, config, skipped):
    """"""
    for path in paths:
        if os.path.isdir(path):
            if should_skip(path, config, os.getcwd()):
                skipped.append(path)
                continue

            for dirpath, dirnames, filenames in os.walk(path, topdown=True):
                for dirname in list(dirnames):
                    if should_skip(dirname, config, dirpath):
                        skipped.append(dirname)
                        dirnames.remove(dirname)
                for filename in filenames:
                    if filename.endswith('.py'):
                        if should_skip(filename, config, dirpath):
                            skipped.append(filename)
                        else:
                            yield os.path.join(dirpath, filename)
        else:
            yield path
1285550
def _resolve_source(self, source):
        """"""
        if os.path.isdir(source):
            sources = glob.glob(os.path.join(source, '*.sbml'))
            if len(sources) == 0:
                raise ModelLoadError('No .sbml file found in source directory')
            elif len(sources) > 1:
                raise ModelLoadError(
                    'More than one .sbml file found in source directory')
            return sources[0]
        return source
518290
def find_files(globs):
	""""""

	last_cwd = os.getcwd()
	os.chdir(config.cwd)

	gex, gin = separate_globs(globs)

	# Find excluded files
	exclude = []
	for glob in gex:
		parse_glob(glob, exclude)

	files = []
	include = []
	order = 0

	# Find included files and removed excluded files
	for glob in gin:
		order += 1
		array = parse_glob(glob, include)
		base = find_base(glob)

		for file in array:
			if file not in exclude:
				files.append((order, base, file))

	os.chdir(last_cwd)
	return files
1116535
def get_uri(self):
        """"""
        if self.source_file and os.path.exists(self.source_file.path):
            return self.source_file.path
        elif self.source_url:
            return self.source_url
        return None
746481
def _get_install_sources(self):
        
        if not self._sources:
            return ''
        parts = ['--no-index']
        for source in self._sources:
            parts.append("--find-links '{0}'".format(source))
        return ' '.join(parts)
1354128
def file_find(self, load):
        '''
        
        '''
        path = load.get('path')
        if not path:
            return {'path': '',
                    'rel': ''}
        tgt_env = load.get('saltenv', 'base')
        return self.find_file(path, tgt_env)
504334
def find_macthing_files(match):
    """"""
    last_slash = match.rfind('/')
    if last_slash == -1:
        dirname = '.'
        match_prefix = match
        result_prefix = ''
    else:
        dirname = match[0:last_slash]
        match_prefix = match[last_slash + 1:]
        result_prefix = dirname + '/'
    return [result_prefix + filename for filename in os.listdir(dirname) if filename.startswith(match_prefix)]
806834
def finddirs(root):
    """"""
    retval = []
    for root, dirs, files in os.walk(root):
        for d in dirs:
            retval.append(os.path.join(root, d))
    return retval
284521
def find_sources(self):
        """"""
        manifest_filename = os.path.join(self.egg_info, "SOURCES.txt")
        mm = manifest_maker(self.distribution)
        mm.manifest = manifest_filename
        mm.run()
        self.filelist = mm.filelist
1250959
def files(self):
        """"""
        if self._rundir['ls'] is UNDETERMINED:
            out_stem = pathlib.Path(self.par['ioin']['output_file_stem'] + '_')
            out_dir = self.path / out_stem.parent
            if out_dir.is_dir():
                self._rundir['ls'] = set(out_dir.iterdir())
            else:
                self._rundir['ls'] = set()
        return self._rundir['ls']
1161374
def files(self):
        """"""
        self._check_session()
        status, data = self._rest.get_request('files')
        return data
71177
def findinfiles_callback(self):
        """"""
        widget = QApplication.focusWidget()
        if not self.ismaximized:
            self.dockwidget.setVisible(True)
            self.dockwidget.raise_()
        text = ''
        try:
            if widget.has_selected_text():
                text = widget.get_selected_text()
        except AttributeError:
            # This is not a text widget deriving from TextEditBaseWidget
            pass
        self.findinfiles.set_search_text(text)
        if text:
            self.findinfiles.find()
434534
function find(source, fn) {
  glob('**', {cwd: source, dot: true}, function(err, files) {
    fn(err, files);
  });
}
573266
def _find_file(self, load):
        '''
        
        '''
        path = load.get('path')
        if not path:
            return {'path': '',
                    'rel': ''}
        tgt_env = load.get('saltenv', 'base')
        return self.find_file(path, tgt_env)