Return a list of all root paths where JS files can be found, given the
    command line options (in dict form) for this script.
16371
def get_path_list(opts):
    
    paths = []
    for opt, arg in list(opts.items()):
        if opt in ('-p', '--jspath'):
            paths.append(arg)
    return paths or [os.getcwd()]
846292
def all_javascript_paths
      all_paths = []
      all_paths += @javascripts
      all_paths += @background_scripts
      all_paths += @content_scripts.map { |cs| cs.javascripts }.compact
      all_paths.flatten.uniq
    end
1021322
def filepaths(self):
        
        if self.path is not None:
            yield from utils.filepaths(self.path, exclude=self.exclude,
                                       hidden=False, empty=False)
408820
def paths(self) -> [str]:
        

        return set([f.path for f in list(self._files.values())])
1182069
def getFilePathsWithExtensionsInDirectory(dirTree, patterns, sort=True):
    
    filePaths = []
    for root, dirs, files in os.walk(dirTree):
        for filePath in files:
            for pattern in patterns:
                if fnmatch.fnmatch(filePath, pattern):
                    fullPath = os.path.join(root, filePath)
                    filePaths.append(fullPath)
                    break
    if sort:
        filePaths.sort()
    return filePaths
739296
function getSourceTrees(pathsToSearch) {
	return {
		read: function(readTree) {
			var promises = _.map(pathsToSearch, function(path) {
				return new Promise(function(resolve) {
					fs.exists(path, function(exists) {
						resolve((exists) ? path : null);
					});
				});
			});

			return Promise.all(promises)
				.then(function(paths) {
					paths = _.filter(paths);
					if (paths.length === 0) throw new Error('No source paths found');
					return paths;
				})
				.then(function(paths) {
					console.log('Found source paths: ' + paths.join(', '));

					var pathTrees = _.map(paths, function(path) {
						return new Funnel(path, { srcDir: '.', destDir: path });
					});

					return readTree(mergeTrees(pathTrees));
				});
		},

		cleanup: function() {}
	};
}
876121
def paths_from_buildroot_iter(self):
    """"""
    for f in self:
      yield os.path.join(self.rel_root, f)
907202
function getPathnames(options, schema) {
  let paths = pathsFromTree(schema.tree)
  Object.keys(options['defaultHidden']).forEach(path => {
    if (paths.indexOf(path) === -1) {
      paths.push(path)
    }
  })
  return paths
}
561138
def find(path, saltenv='base'):
    '''
    
    '''
    # Return a list of paths + text or bin
    ret = []
    if saltenv not in __opts__['pillar_roots']:
        return ret
    for root in __opts__['pillar_roots'][saltenv]:
        full = os.path.join(root, path)
        if os.path.isfile(full):
            # Add it to the dict
            with salt.utils.files.fopen(full, 'rb') as fp_:
                if salt.utils.files.is_text(fp_):
                    ret.append({full: 'txt'})
                else:
                    ret.append({full: 'bin'})
    return ret
630058
def get_backends():
    
    IGNORE_DIRS = ["core", "tools", "utils"]

    global backends
    if backends is None:
        backends = {}
        i3pystatus_dir = os.path.dirname(i3pystatus.__file__)
        subdirs = [
            x
            for x in next(os.walk(i3pystatus_dir))[1]
            if not x.startswith("_") and x not in IGNORE_DIRS
        ]
        for subdir in subdirs:
            dirs = next(os.walk(os.path.join(i3pystatus_dir, subdir)))[2]
            backends.update(
                {
                    x[:-3]: "i3pystatus.%s.%s" % (subdir, x[:-3])
                    for x in dirs
                    if not x.startswith("_") and x.endswith(".py")
                }
            )
    return backends
207937
def _get_root_files(self, directory):
        """"""
        if len(self.filepaths) is 0:
            if self.filters:
                root_files = [(directory, f) for f in os.listdir(directory)
                              if os.path.isfile(os.path.join(directory, f))
                              and self.filters.validate(f)
                              and self.filters.get_level(f) == self.filters.max_level]
            else:
                root_files = [(directory, f) for f in os.listdir(directory)
                              if os.path.isfile(os.path.join(directory, f))]
            self.add_path(root_files)
1006035
def _get_parent_remote_paths(self):
        
        parent_paths = set([item.get_remote_parent_path() for item in self.file_urls])
        if '' in parent_paths:
            parent_paths.remove('')
        return parent_paths
1075628
def list_files(paths = [], options = {})
      ref = options[:ref] || 'HEAD'
      path_list = paths.empty? ? '' : "\"#{paths.join('" "')}\""
      `git ls-tree --name-only #{ref} #{path_list}`.
        split(/\n/).
        map { |relative_file| File.expand_path(relative_file) }.
        reject { |file| File.directory?(file) } # Exclude submodule directories
    end
1158252
def find_py_files(srctree, ignore=None):
        

        if not os.path.isdir(srctree):
            yield os.path.split(srctree)
        for srcpath, _, fnames in os.walk(srctree):
            # Avoid infinite recursion for silly users
            if ignore is not None and ignore in srcpath:
                continue
            for fname in (x for x in fnames if x.endswith('.py')):
                yield srcpath, fname
1170372
def src_paths(self):
        
        return {src for src, summary in self._diff_violations().items()
                   if len(summary.measured_lines) > 0}
1133187
def find_packages(path: str) -> List[str]:
    
    ret = []
    for root, _dir, files in os.walk(path):
        if '__init__.py' in files:
            ret.append(root.replace("/", "."))
    return sorted(ret)
954823
function getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptPath, ignoreCase) {
                // Make all paths absolute/normalized if they are not already
                rootDirs = ts.map(rootDirs, function (rootDirectory) { return ts.normalizePath(ts.isRootedDiskPath(rootDirectory) ? rootDirectory : ts.combinePaths(basePath, rootDirectory)); });
                // Determine the path to the directory containing the script relative to the root directory it is contained within
                var relativeDirectory;
                for (var _i = 0, rootDirs_1 = rootDirs; _i < rootDirs_1.length; _i++) {
                    var rootDirectory = rootDirs_1[_i];
                    if (ts.containsPath(rootDirectory, scriptPath, basePath, ignoreCase)) {
                        relativeDirectory = scriptPath.substr(rootDirectory.length);
                        break;
                    }
                }
                // Now find a path for each potential directory that is to be merged with the one containing the script
                return ts.deduplicate(ts.map(rootDirs, function (rootDirectory) { return ts.combinePaths(rootDirectory, relativeDirectory); }));
            }