Load paths into the sprockets environment.
 Values are loaded from {#paths}.
354819
def load_paths
      paths.each do |path|
        full_path = path
        full_path = File.join(directory, path) unless directory.nil?
        sprockets.append_path full_path
      end
      self
    end
981785
def _load_start_paths(self):
        "  "
        if self._startup_paths:
            for path in self._startup_paths:
                if os.path.exists(path):
                    with open(path, 'rb') as f:
                        code = compile(f.read(), path, 'exec')
                        six.exec_(code, self.get_globals(), self.get_locals())
                else:
                    output = self.app.output
                    output.write('WARNING | File not found: {}\n\n'.format(path))
1168131
protected void loadPaths(ArrayList<PathImpl> paths, PathImpl dir)
  {
    try {
      for (String fileName : dir.list()) {
        PathImpl path = dir.lookup(fileName);

        if (fileName.endsWith(".jar") || fileName.endsWith(".zip")) {
          paths.add(path);
        }
        else if (path.isDirectory()) {
          loadPaths(paths, path);
        }
      }
      
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
1129684
def load(self, path):
        
        with open(path, 'rb') as f:
            self.data = f.read()
            self.root = et.fromstring(self.data)
145752
function paths(dir) {
	var paths = [];

	try {
		fs.statSync(dir);
	}
	catch (e) {
		return e;
	}

	(function traverse(dir, stack) {
		stack.push(dir);
		fs.readdirSync(stack.join('/')).forEach(function(file) {
			var path = stack.concat([file]).join('/'),
				stat = fs.statSync(path);

			if (file[0] == '.' || file === 'vendor') {
				return;
			} else if (stat.isFile() && /\.js$/.test(file)) {
				paths.push(path);
			} else if (stat.isDirectory()) {
				paths.push(path);
				traverse(file, stack);
			}
		});
		stack.pop();
	})(dir || '.', []);

	return paths;
}
830853
private static void setupPaths( PathsType paths) {
        File voltDbRoot;
        // Handles default voltdbroot (and completely missing "paths" element).
        voltDbRoot = getVoltDbRoot(paths);
        //Snapshot
        setupSnapshotPaths(paths.getSnapshots(), voltDbRoot);
        //export overflow
        setupExportOverflow(paths.getExportoverflow(), voltDbRoot);
        // only use these directories in the enterprise version
        setupCommandLog(paths.getCommandlog(), voltDbRoot);
        setupCommandLogSnapshot(paths.getCommandlogsnapshot(), voltDbRoot);
        setupDROverflow(paths.getDroverflow(), voltDbRoot);
        setupLargeQuerySwap(paths.getLargequeryswap(), voltDbRoot);
    }
857794
def load_collectors_from_paths(paths):
    
    # Initialize return value
    collectors = {}

    if paths is None:
        return

    if isinstance(paths, basestring):
        paths = paths.split(',')
        paths = map(str.strip, paths)

    load_include_path(paths)

    for path in paths:
        # Get a list of files in the directory, if the directory exists
        if not os.path.exists(path):
            raise OSError("Directory does not exist: %s" % path)

        if path.endswith('tests') or path.endswith('fixtures'):
            return collectors

        # Load all the files in path
        for f in os.listdir(path):

            # Are we a directory? If so process down the tree
            fpath = os.path.join(path, f)
            if os.path.isdir(fpath):
                subcollectors = load_collectors_from_paths([fpath])
                for key in subcollectors:
                    collectors[key] = subcollectors[key]

            # Ignore anything that isn't a .py file
            elif (os.path.isfile(fpath) and
                  len(f) > 3 and
                  f[-3:] == '.py' and
                  f[0:4] != 'test' and
                  f[0] != '.'):

                modname = f[:-3]

                fp, pathname, description = imp.find_module(modname, [path])

                try:
                    # Import the module
                    mod = imp.load_module(modname, fp, pathname, description)
                except (KeyboardInterrupt, SystemExit) as err:
                    logger.error(
                        "System or keyboard interrupt "
                        "while loading module %s"
                        % modname)
                    if isinstance(err, SystemExit):
                        sys.exit(err.code)
                    raise KeyboardInterrupt
                except Exception:
                    # Log error
                    logger.error("Failed to import module: %s. %s",
                                 modname,
                                 traceback.format_exc())
                else:
                    for name, cls in get_collectors_from_module(mod):
                        collectors[name] = cls
                finally:
                    if fp:
                        fp.close()

    # Return Collector classes
    return collectors
1025363
function load(root, path, callback, errback) {
		resolve(root, path, function (realPath, contents) {
			process(realPath, contents, callback, errback);
		}, errback);
	}
399756
def __load_paths(self, base_path=None):
        
        if base_path is None:
            base_path = dirname(dirname(dirname(__file__)))
        if not base_path.endswith(sep):
            base_path += sep
        self.__paths = {
            'base': base_path,
            'cert': base_path + 'certs' + sep,
            'lib': base_path + 'lib' + sep,
            'extlib': base_path + 'extlib' + sep,
        }
334667
function loadIfExists(path, moduleStack, errMsg) {
        var servicesDir = this.injector.servicesDir;
        var servicesFullPath = this.injector.rootDir + '/' + servicesDir;

        // if the file doesn't exist, either throw an error (if msg passed in), else just return null
        if (!fs.existsSync(p.join(servicesFullPath, path + '.js'))) {
            if (errMsg) {
                throw new Error(errMsg + ' ' + servicesFullPath + path + '.js');
            }
            else {
                return null;
            }
        }

        // else load the module
        return this.injector.loadModule(servicesDir + path, moduleStack);
    }
1308343
function load () {
  const str = fs.readFileSync(settingsFile, 'utf8')
  if (str) {
    const settings = JSON.parse(str)
    this.settings = settings.livereload
    this.paths = getPaths(settings)
      .map(p => path.normalize(this.root + '/' + p))
      .map(p => makeGlob(p))
  }
}
693489
def sprockets_env
      @sprockets_env ||= Sprockets::Environment.new(project_root) { |env| env.logger = Logger.new(STDOUT) }
    end
110939
def init_path():
    
    sitedirs = getsyssitepackages()
    for sitedir in sitedirs:
        env_path = os.environ['PATH'].split(os.pathsep)
        for module in allowed_modules:
            p = join(sitedir, module)
            if isdir(p) and not p in env_path:
                os.environ['PATH'] += env_t(os.pathsep + p)
1162202
function loadResources() {
        var resources = {};
        var resourcesDir = path.join(this.injector.rootDir, this.injector.servicesDir + '/resources');


        if (!fs.existsSync(resourcesDir)) {
            return resources;
        }

        var me = this;
        var resourceNames = fs.readdirSync(resourcesDir);

        _.each(resourceNames, function (resourceName) {
            if (resourceName.substring(resourceName.length - 3) !== '.js') {  // only dirs, not js files
                resources[resourceName] = me.injector.loadModule(utils.getCamelCase(resourceName + '.resource'));
            }
        });

        return resources;
    }
725713
def load(path):
    """"""
    with open(path) as rfile:
        steps = MODEL.parse(rfile.read())

    new_steps = []
    for step in steps:
        new_steps += expand_includes(step, path)

    return new_steps
63567
def sprockets(source_file, opts={})
      require 'sprockets'
      source_path = source_file || opt[:main] || opt[:from]
      env = ::Sprockets::Environment.new site.root
      env.append_path File.expand_path(File.join site.source_path, File.dirname(source_path))
      env.append_path site.source_path
      # env.append_path File.dirname(source_path)
      [opts[:paths]].flatten.each do |path|
        env.append_path(path) unless path.nil?
      end
      content= env[ source_path ].to_s
    rescue LoadError
      raise StandardError, "Sprockets can't be loaded. Please add it to your Gemfile."
    end
697265
def load_settings(path)

        # Load the data files
        Konfig.load_directory(path)

        # Load all adapters
        built_in_adapters = File.join(File.dirname(__FILE__), 'adapters', '*.rb')
        require_all built_in_adapters

        user_adapters = File.join(path, 'adapters', '*_adapter.rb')
        require_all user_adapters

        # Apply the adapters to the data
        Adapter.create_child_instances(Konfig.default_store.data)
        Adapter.send_to_child_instances :adapt
      end