This function adds the path to the Phar Lap binaries, includes,
    and libraries, if they are not already there.
549891
def addPharLapPaths(env):
    """"""
    ph_path = getPharLapPath()

    try:
        env_dict = env['ENV']
    except KeyError:
        env_dict = {}
        env['ENV'] = env_dict
    SCons.Util.AddPathIfNotExists(env_dict, 'PATH',
                                  os.path.join(ph_path, 'bin'))
    SCons.Util.AddPathIfNotExists(env_dict, 'INCLUDE',
                                  os.path.join(ph_path, 'include'))
    SCons.Util.AddPathIfNotExists(env_dict, 'LIB',
                                  os.path.join(ph_path, 'lib'))
    SCons.Util.AddPathIfNotExists(env_dict, 'LIB',
                                  os.path.join(ph_path, os.path.normpath('lib/vclib')))
    
    env['PHARLAP_PATH'] = getPharLapPath()
    env['PHARLAP_VERSION'] = str(getPharLapVersion())
705955
def add_path(self, path):
        

        if os.path.exists(path):
            self.paths.add(path)
            return path
        else:
            #logger.debug('Path {} doesn\'t exist'.format(path))
            return None
515702
def add_sys_paths(paths):
    
    original_syspath = sys.path[:]
    sys.path.extend(paths)

    try:
        yield
    finally:
        sys.path = original_syspath
907273
def add_path(self, path):
        
        abspath = os.path.abspath(path)
        self.children.append(_build_project_tree(abspath, self.followsymlinks, self.file_filter))
890517
def add(self, paths, **params):
        
        log = self._getparam('log', self._discard, **params)
        missing = self._getparam('missing', True, **params)
        commit = self._getparam('commit', True, **params)

        if type(paths) is not list:
            paths = [paths]

        rebuild = False
        for path in paths:
            if path in self.paths:
                if self.paths[path] == missing:
                    log.info("Ignoring attempt to add existing path %r", path)
                else:
                    log.debug("Changing missing state from %s to %s on existing path %r",
                            str(self.paths[path]), str(missing), path)
                    self.paths[path] = missing
            else:
                log.debug("Adding path %r", path)
                self.paths[path] = missing
                rebuild = True
        if commit and rebuild:
            self.commit(**params)
561927
public static void addLibraryPath(String pathToAdd) throws Exception {
		Field usrPathsField = ClassLoader.class.getDeclaredField("usr_paths");
		usrPathsField.setAccessible(true);

		// get array of paths
		final String[] paths = (String[]) usrPathsField.get(null);

		// check if the path to add is already present
		for (String path : paths) {
			if (path.equals(pathToAdd)) {
				return;
			}
		}

		// add the new path
		final String[] newPaths = Arrays.copyOf(paths, paths.length + 1);
		newPaths[newPaths.length - 1] = pathToAdd;
		usrPathsField.set(null, newPaths);
	}
410694
def insert_system_path(opts, paths):
    '''
    
    '''
    if isinstance(paths, six.string_types):
        paths = [paths]
    for path in paths:
        path_options = {'path': path, 'root_dir': opts['root_dir']}
        prepend_root_dir(path_options, path_options)
        if (os.path.isdir(path_options['path'])
                and path_options['path'] not in sys.path):
            sys.path.insert(0, path_options['path'])
939056
public function addFiles(Phar $phar)
    {
        $finder = new Finder();
        $finder->files()
            ->ignoreVCS(true)
            ->name('*.php')
            ->name('*.stub')
            ->exclude('Tests')
            ->exclude('tests')
            ->exclude('/storage')
            ->exclude('/config')
            ->exclude('/build')
            ->in($this->pathBase);
        foreach ($finder as $file) {
            $this->addFile($phar, $file);
        }
    }
51491
def put_path(self, path):
        
        if self.is_package(path):
            logger.debug('PYTHON PACKAGE: {}'.format(path))
            self.python_paths.append(path.parent)
            site.addsitedir(str(path.parent))
            xbmdirs = self.get_directories_with_extensions(
                path,
                self.icon_extensions,
            )
            self.xbmlang_paths.extend(xbmdirs)
            return

        if self.has_next(path.glob('*.' + self.MEL)):
            logger.debug('MEL: {}'.format(str(path)))
            self.script_paths.append(path)

        if self.has_next(path.glob('*.' + self.PYTHON)):
            logger.debug('PYTHONPATH: {}'.format(str(path)))
            self.python_paths.append(path)
            site.addsitedir(str(path))

        if self.PLUGIN in list(path.iterdir()):
            logger.debug('PLUG-IN: {}'.format(str(path)))
            self.plug_in_paths.append(path)

        for ext in self.icon_extensions:
            if self.has_next(path.glob('*.' + ext)):
                logger.debug('XBM: {}.'.format(str(path)))
                self.xbmlang_paths.append(path)
                break
324822
def register_path(self, path):
        
        self._paths.insert(0, os.path.abspath(path))
1334757
def _SetupPaths():
  """"""
  sdk_path = _FindSdkPath()
  if sdk_path:
    sys.path.append(sdk_path)
    try:
      import dev_appserver  # pylint: disable=g-import-not-at-top
      if hasattr(dev_appserver, 'fix_sys_path'):
        dev_appserver.fix_sys_path()
      else:
        logging.warning(_NO_FIX_SYS_PATH_WARNING)
    except ImportError:
      logging.warning(_IMPORT_ERROR_WARNING)
  else:
    logging.warning(_NOT_FOUND_WARNING)

  # Add the path above this directory, so we can import the endpoints package
  # from the user's app code (rather than from another, possibly outdated SDK).
  # pylint: disable=g-import-not-at-top
  from google.appengine.ext import vendor
  vendor.add(os.path.dirname(os.path.dirname(__file__)))
1055936
def add_directory(self, path, ignore=None):
        
        for root, dirs, files in os.walk(path):
            arc_prefix = os.path.relpath(root, os.path.dirname(path))
            # py3 remove pyc cache dirs.
            if '__pycache__' in dirs:
                dirs.remove('__pycache__')
            for f in files:
                dest_path = os.path.join(arc_prefix, f)

                # ignore specific files
                if ignore and ignore(dest_path):
                    continue

                if f.endswith('.pyc') or f.endswith('.c'):
                    continue
                f_path = os.path.join(root, f)

                self.add_file(f_path, dest_path)
1229142
def _add_asset_bundle(cls, path):
        
        f = "%s/assets.yml" % path
        if os.path.isfile(f):
            cls._asset_bundles.add(f)
832491
def add_paths(paths, base_path, operations):
    
    for operation, ns, rule, func in operations:
        path = build_path(operation, ns)
        if not path.startswith(base_path):
            continue
        method = operation.value.method.lower()
        # If there is no version number or prefix, we'd expect the base path to be ""
        # However, OpenAPI requires the minimal base path to be "/"
        # This means we need branching logic for that special case
        suffix_start = 0 if len(base_path) == 1 else len(base_path)
        paths.setdefault(
            path[suffix_start:],
            swagger.PathItem(),
        )[method] = build_operation(operation, ns, rule, func)
294281
def add_path(self, w, h):
        """"""
        path = self._add_path()
        path.w, path.h = w, h
        return path
260249
private function addTpl($phar)
    {
        $json = new Finder();
        $json->files()->ignoreVCS(true)->ignoreDotFiles(true)->name('*.tpl.json')->in($this->path . '/tpl');

        foreach ($json as $file) {
            $this->addFile($phar, $file, false);
        }

        $php = new Finder();
        $php->files()->ignoreVCS(true)->ignoreDotFiles(true)->name('*.php')->in($this->path . '/tpl');

        foreach ($php as $file) {
            $this->addFile($phar, $file);
        }
    }
1097310
def append_rez_path(self):
        """"""
        if system.rez_bin_path:
            self.env.PATH.append(system.rez_bin_path)