Returns the file server modules
181898
def fileserver(opts, backends):
    '''
    
    '''
    return LazyLoader(_module_dirs(opts, 'fileserver'),
                      opts,
                      tag='fileserver',
                      whitelist=backends,
                      pack={'__utils__': utils(opts)})
961103
def _get_persistent_modules():
    '''
    
    '''
    mods = set()
    with salt.utils.files.fopen(_LOADER_CONF, 'r') as loader_conf:
        for line in loader_conf:
            line = salt.utils.stringutils.to_unicode(line)
            line = line.strip()
            mod_name = _get_module_name(line)
            if mod_name:
                mods.add(mod_name)
    return mods
92975
function loadModules(rootDir, paths) {
        var serverModules = {};
        var me = this;

        // return empty object if no rootDir or paths
        if (!rootDir || !paths) { return serverModules; }

        // loop through paths and load all modules in those directories
        _.each(paths, function (relativePath) {
            var fullPath = path.normalize(rootDir + delim + relativePath);

            // if the directory doesn't exist, then skip to the next loop iteration
            if (fs.existsSync(fullPath)) {

                _.each(fs.readdirSync(fullPath), function (fileName) {

                    // if it is a javascript file and it DOES NOT end in .service.js, then save the mapping
                    if (utils.isJavaScript(fileName) && !fileName.match(/^.*\.service\.js$/)) {
                        var nameLower = utils.getCamelCase(fileName).toLowerCase();
                        var fullFilePath = path.normalize(fullPath + '/' + fileName);

                        // there are 2 diff potential aliases for any given server module
                        serverModules[nameLower + 'fromplugin'] = serverModules[nameLower] = require(fullFilePath);
                    }

                    // else if we are dealing   with a directory, recurse down into the folder
                    else if (fs.lstatSync(path.join(fullPath, fileName)).isDirectory()) {
                        _.extend(serverModules, me.loadModules(rootDir, [relativePath + '/' + fileName]));
                    }

                });
            }
        });

        return serverModules;
    }
52833
@XmlElementWrapper(name="modules")
    @XmlElement(name="module", type=Module.class)
    public List<Module> getModules() {
        return modules;
    }
483914
def collect_modules(self):
        """"""
        for path, dirlist, filelist in os.walk(self.root):
            for name in fnmatch.filter(filelist, self.filter):
                if self.is_git_file(path, name):
                    yield (os.path.join(path, name), [])
1285674
public List<ModuleType<ApplicationType<T>>> getAllModule()
   {
      List<ModuleType<ApplicationType<T>>> list = new ArrayList<ModuleType<ApplicationType<T>>>();
      List<Node> nodeList = childNode.get("module");
      for(Node node: nodeList)
      {
         ModuleType<ApplicationType<T>>  type = new ModuleTypeImpl<ApplicationType<T>>(this, "module", childNode, node);
         list.add(type);
      }
      return list;
   }
234387
def get_modules(self, type_name):
        '''
        '''
        modules = []
        for module in self:
            if module.__class__.__name__ == type_name:
                modules.append(module)
        return modules
563316
def get_plugin_modules(folders, package='plugins',
                       parentpackage='linkcheck.dummy'):
    """"""
    for folder in folders:
        for module in loader.get_folder_modules(folder, parentpackage):
            yield module
    for module in loader.get_package_modules(package):
        yield module
1137416
def _get_loaded_modules():
        """"""
        output = subprocess.check_output(['apache2ctl', '-M'])
        if six.PY3:
            output = output.decode('utf-8')
        modules = []
        for line in output.splitlines():
            # Each line of the enabled module output looks like:
            #  module_name (static|shared)
            # Plus a header line at the top of the output which is stripped
            # out by the regex.
            matcher = re.search(r'^ (\S*)_module (\S*)', line)
            if matcher:
                modules.append(matcher.group(1))
        return modules
467657
function getModulesByDir (dir, scope = '') {
  const nodeModulesDir = getNodeModulesDir()
  const results = []
  const modules = fs.readdirSync(dir)

  if (!modules.length) {
    return results
  }

  modules.forEach(module => {
    if (module.startsWith('.')) {

    } else if (module.startsWith('@')) {
      const subDir = path.join(nodeModulesDir, module)
      const subModules = getModulesByDir(subDir, module)
      Array.prototype.push.call(results, ...subModules)
    } else {
      results.push(scope ? `${scope}/${module}` : module)
    }
  })

  return results
}
281806
def _get_modules(self, names):
        
        loaded_modules = []
        for name in names:
            loaded_modules.append(sys.modules[name])
        return loaded_modules
649604
def listModules(self):
        """"""
        modules = list(self.modules.items())
        modules.sort()
        return [module for name, module in modules]
1348398
protected function getSiteModules() : array
    {
        $modules    = [];
        $modulePath = $_SERVER['DOCUMENT_ROOT'] . '/../module/MelisSites';

        if (is_dir($modulePath)){
            foreach (scandir($modulePath) as $module) {
                // Skip directory pointers
                if ($module == '.' || $module == '..') continue;

                if (is_dir($modulePath . '/' . $module)) {
                    $modules[$module] = $this->getControllers($modulePath . '/' . $module . '/src/' . $module . '/Controller');
                }
            }
        }

        return $modules;
    }
875226
public function getModulesFromRepository()
    {
        $modules = array();

        $system = $this->systemService->getActiveSystem();

        foreach($this->repositories as $repository){
            // Retrieve compatible modules.
            $client = new Client([
                'base_uri' => $repository,
            ]);
            $response = $client->get('d/'.$system->getPackage().'/'.$this->distributionVersion.'.json');
            $compatibleModules = json_decode($response->getBody());
            // TODO: What to do if same module exists in different repositories?
            $modules = array_merge($modules, $compatibleModules->results);
        }

        if(count($modules) === 0){
            return self::STATUS_NO_MODULES;
        }

        return $modules;
    }
1293099
function getModules(directory, logger, local) {
    logger(`Getting modules @ ${directory.path}`);
    if (directory.barrel) {
        // If theres a barrel then use that as it *should* contain descendant modules.
        logger(`Found existing barrel @ ${directory.barrel.path}`);
        return [directory.barrel];
    }
    const files = [].concat(directory.files);
    if (!local) {
        directory.directories.forEach((childDirectory) => {
            // Recurse.
            files.push(...getModules(childDirectory, logger, local));
        });
    }
    // Only return files that look like TypeScript modules.
    return files.filter((file) => file.name.match(utilities_1.isTypeScriptFile));
}
1270952
@Override
	public List<String> getModules() throws BadRequestException {
		final String sourceMethod = "getModules"; //$NON-NLS-1$
		if (isTraceLogging) {
			log.entering(RequestedModuleNames.class.getName(), sourceMethod);
		}
		if (modules == null) {
			modules = decodeModules(moduleQueryArg, base64decodedIdList, true);
			if (modules.size() != count) {
				throw new BadRequestException();
			}
		}
		if (isTraceLogging) {
			log.exiting(RequestedModuleNames.class.getName(), sourceMethod, modules);
		}
		return modules;
	}
1213424
@Override
    public List<Class<?>> getModules() {
        return Arrays.asList(
                Gmap3ApplibModule.class,
                Gmap3ServiceModule.class,
                Gmap3UiModule.class,
                Gmap3DemoFixtureModule.class,
                Gmap3DemoAppModule.class
        );
    }