list of files to load as configuration.
should be set to empty list if none needed
189411
private function getResources()
    {

        $resources = [];
        foreach( $this->getClassAnnotations() as $annotation ) {

            // is this a resource
            if( 0 === strpos($annotation, "resource") ) {
                $resources[] = explode(' ', $annotation)[1];
            }

        }

        return $resources;

    }
549558
def load_config(path):
    
    args = []
    with open(path, 'r') as fp:
        for line in fp.readlines():
            if line.strip() and not line.startswith("#"):
                args.append(line.replace("\n", ""))

    return args
1269633
def load_config(filename):
    
    config = None
    if os.path.isfile(filename) and os.access(filename, os.R_OK):
        with open(filename, 'r') as fh:
            config = json.loads(fh.read())
    return config
927811
def _load_files(self):
        '''
        
        '''
        files = {}
        for fn_ in self.opts['src']:
            if os.path.isfile(fn_):
                files.update(self._file_dict(fn_))
            elif os.path.isdir(fn_):
                salt.utils.stringutils.print_cli(
                    fn_ + ' is a directory, only files are supported '
                    'in non-chunked mode. Use "--chunked" command '
                    'line argument.')
                sys.exit(1)
        return files
871844
def load(self, file_path):
        '''  '''
        self.clear()
        self.__config = self.read_file(file_path)
551859
def LoadChecksFromFiles(file_paths, overwrite_if_exists=True):
  """"""
  loaded = []
  for file_path in file_paths:
    configs = LoadConfigsFromFile(file_path)
    for conf in itervalues(configs):
      check = Check(**conf)
      # Validate will raise if the check doesn't load.
      check.Validate()
      loaded.append(check)
      CheckRegistry.RegisterCheck(
          check,
          source="file:%s" % file_path,
          overwrite_if_exists=overwrite_if_exists)
      logging.debug("Loaded check %s from %s", check.check_id, file_path)
  return loaded
91949
def load(self, patterns, dirs, ignore=None):
        
        for dir_ in dirs:
            dir_root = dir_
            if os.path.exists(os.path.join(dir_, "__init__.py")):
                dir_root = os.path.abspath(os.path.join(dir_, os.pardir))

            for path in self.find_files(patterns=patterns, dirs=[dir_], ignore=ignore):
                data = self.read_file(path=path)
                if data:
                    data["relative_path"] = os.path.relpath(path, dir_root)
                    self.paths[path] = data
449016
def _file_lists(self, load, form):
        '''
        
        '''
        if 'env' in load:
            # "env" is not supported; Use "saltenv".
            load.pop('env')

        if not os.path.isdir(self.file_list_cachedir):
            try:
                os.makedirs(self.file_list_cachedir)
            except os.error:
                log.error('Unable to make cachedir %s', self.file_list_cachedir)
                return []
        list_cache = salt.utils.path.join(
            self.file_list_cachedir,
            '{0}.p'.format(load['saltenv'].replace(os.path.sep, '_|-'))
        )
        w_lock = salt.utils.path.join(
            self.file_list_cachedir,
            '.{0}.w'.format(load['saltenv'].replace(os.path.sep, '_|-'))
        )
        cache_match, refresh_cache, save_cache = \
            salt.fileserver.check_file_list_cache(
                self.opts, form, list_cache, w_lock
            )
        if cache_match is not None:
            return cache_match
        if refresh_cache:
            ret = {'files': set(), 'symlinks': {}, 'dirs': set()}
            if salt.utils.stringutils.is_hex(load['saltenv']) \
                    or load['saltenv'] in self.envs():
                for repo in self.remotes:
                    repo_files, repo_symlinks = repo.file_list(load['saltenv'])
                    ret['files'].update(repo_files)
                    ret['symlinks'].update(repo_symlinks)
                    ret['dirs'].update(repo.dir_list(load['saltenv']))
            ret['files'] = sorted(ret['files'])
            ret['dirs'] = sorted(ret['dirs'])

            if save_cache:
                salt.fileserver.write_file_list_cache(
                    self.opts, ret, list_cache, w_lock
                )
            # NOTE: symlinks are organized in a dict instead of a list, however
            # the 'symlinks' key will be defined above so it will never get to
            # the default value in the call to ret.get() below.
            return ret.get(form, [])
        # Shouldn't get here, but if we do, this prevents a TypeError
        return {} if form == 'symlinks' else []
107566
def config_files():
    '''
    
    '''
    sensu_loaded_tempfile = os.environ.get('SENSU_LOADED_TEMPFILE')
    sensu_config_files = os.environ.get('SENSU_CONFIG_FILES')
    sensu_v1_config = '/etc/sensu/config.json'
    sensu_v1_confd = '/etc/sensu/conf.d'
    if sensu_loaded_tempfile and os.path.isfile(sensu_loaded_tempfile):
        with open(sensu_loaded_tempfile, 'r') as tempfile:
            contents = tempfile.read()
            return contents.split(':')
    elif sensu_config_files:
        return sensu_config_files.split(':')
    else:
        files = []
        filenames = []
        if os.path.isfile(sensu_v1_config):
            files = [sensu_v1_config]
        if os.path.isdir(sensu_v1_confd):
            filenames = [f for f in os.listdir(sensu_v1_confd)
                         if os.path.splitext(f)[1] == '.json']
            for filename in filenames:
                files.append('{}/{}'.format(sensu_v1_confd, filename))
        return files
921039
def _file_lists(load, form):
    '''
    
    '''
    if 'env' in load:
        # "env" is not supported; Use "saltenv".
        load.pop('env')

    list_cachedir = os.path.join(__opts__['cachedir'], 'file_lists/hgfs')
    if not os.path.isdir(list_cachedir):
        try:
            os.makedirs(list_cachedir)
        except os.error:
            log.critical('Unable to make cachedir %s', list_cachedir)
            return []
    list_cache = os.path.join(list_cachedir, '{0}.p'.format(load['saltenv']))
    w_lock = os.path.join(list_cachedir, '.{0}.w'.format(load['saltenv']))
    cache_match, refresh_cache, save_cache = \
        salt.fileserver.check_file_list_cache(
            __opts__, form, list_cache, w_lock
        )
    if cache_match is not None:
        return cache_match
    if refresh_cache:
        ret = {}
        ret['files'] = _get_file_list(load)
        ret['dirs'] = _get_dir_list(load)
        if save_cache:
            salt.fileserver.write_file_list_cache(
                __opts__, ret, list_cache, w_lock
            )
        return ret.get(form, [])
    # Shouldn't get here, but if we do, this prevents a TypeError
    return []
500805
def read_config_files(files)
      config = clone

      files.each do |file|
        unless File.exist?(file)
          raise ConfigurationFileNotFound, "Unable to load config file: #{file}"
        end

        config = config.deep_merge(read_config_file(file))
      end

      config.replace_values_from_env
    end
689767
def load_configuration():
    """"""

    (belbio_conf_fp, belbio_secrets_fp) = get_belbio_conf_files()
    log.info(f"Using conf: {belbio_conf_fp} and secrets files: {belbio_secrets_fp} ")

    config = {}
    if belbio_conf_fp:
        with open(belbio_conf_fp, "r") as f:
            config = yaml.load(f, Loader=yaml.SafeLoader)
            config["source_files"] = {}
            config["source_files"]["conf"] = belbio_conf_fp

    if belbio_secrets_fp:
        with open(belbio_secrets_fp, "r") as f:
            secrets = yaml.load(f, Loader=yaml.SafeLoader)
            config["secrets"] = copy.deepcopy(secrets)
            if "source_files" in config:
                config["source_files"]["secrets"] = belbio_secrets_fp

    get_versions(config)

    # TODO - needs to be completed
    # add_environment_vars(config)

    return config
1098268
def load(self, source, as_defaults=False):
        
        if isinstance(source, six.string_types):
            source = os.path.expanduser(source)
            with open(source, encoding='utf-8') as f:
                self._rw.load_config_from_file(self._config, f, as_defaults=as_defaults)

        elif isinstance(source, (list, tuple)):
            for s in source:
                with open(s, encoding='utf-8') as f:
                    self._rw.load_config_from_file(self._config, f, as_defaults=as_defaults)

        else:
            self._rw.load_config_from_file(self._config, source, as_defaults=as_defaults)
754963
def __load_all(self, config_filename):
        
        self._read_configuration_file(config_filename)
        self.connect()
        self.__find_source_files()
        self._get_column_type()
        self.__read_stored_routine_metadata()
        self.__get_constants()
        self._get_old_stored_routine_info()
        self._get_correct_sql_mode()
        self.__load_stored_routines()
        self._drop_obsolete_routines()
        self.__remove_obsolete_metadata()
        self.__write_stored_routine_metadata()
        self.disconnect()
42738
public static void configureFiles(Iterable<File> files)
	{
		for (File file : files)
		{
			if (file != null && file.exists() && file.canRead())
			{
				setup(file);
				return;
			}
		}

		System.out.println("(No suitable log config file found)");
	}
1072591
def load(self, patterns, dirs, ignore=None):
        
        for _dir in dirs:
            data = self.read_file(_dir, ignore=ignore)
            if data:
                self.paths[_dir] = data
55878
def load
      config_file = find_file @filenames

      config = Utils.load_auto config_file
      config.empty? ? @default_config : @default_config.merge(config)
    end