additional paths (Getter/Setter/Default)
166127
def additional_paths_selection=(route_map)
      route_map.strip!
      if route_map.empty?
        state = 'no'
        # Dummy routemap required if not configured.
        if additional_paths_selection.empty?
          route_map = 'dummy_routemap'
        else
          route_map = additional_paths_selection
        end
      end
      set_args_keys(state: state, route_map: route_map, route_policy: route_map)
      config_set('bgp_af', 'additional_paths_selection', @set_args)
    end
154809
public void setAdditionalRoots(List<String> roots) {

        List<String> additionalRoots = new ArrayList<>();
        // making sure all paths end with the path separator CHAR
        for (String path : roots) {
            if (path != null) {
                if (!path.endsWith(File.separator)) {
                    path += File.separator;
                }
            }
            additionalRoots.add(path);
        }
        m_additionalRoots = additionalRoots;
    }
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
}
28983
def _get_path(name, settings, mkdir=True):
    
    default_projects_path = settings.config.get("projects_path")
    path = None

    if default_projects_path:
        path = raw_input("\nWhere would you like to create this project? [{0}/{1}] ".format(default_projects_path, name))
        if not path:
            path = os.path.join(default_projects_path, name)
    else:
        while not path:
            path = raw_input("\nWhere would you like to create this project? (e.g. ~/tarbell/) ")

    return os.path.expanduser(path)
352181
function extendResolvePath(basedir) {
    // using module internals isn't good, but restarting with corrected NODE_PATH looks more ugly, IMO
    module.paths.push(basedir);

    const _basedir = basedir.split('/'),
        size = basedir.length;
    let i = 0;

    while (size > i++) {
        const modulesPath = _basedir.slice(0, i).join('/') + '/node_modules';

        if (module.paths.indexOf(modulesPath) === -1) {
            module.paths.push(modulesPath);
        }
    }
}
173367
public void addStrippedPropertyPaths(List<String> strippedPaths, String nestedPath, String propertyPath) {
        
        final int startIndex = propertyPath.indexOf('[');
        if (startIndex != -1) {
            final int endIndex = propertyPath.indexOf(']');
            if (endIndex != -1) {
                final String prefix = propertyPath.substring(0, startIndex);
                final String key = propertyPath.substring(startIndex, endIndex + 1);
                final String suffix = propertyPath.substring(endIndex + 1, propertyPath.length());
                
                // Strip the first key.
                strippedPaths.add(nestedPath + prefix + suffix);
                
                // Search for further keys to strip, with the first key stripped.
                addStrippedPropertyPaths(strippedPaths, nestedPath + prefix, suffix);
                
                // Search for further keys to strip, with the first key not stripped.
                addStrippedPropertyPaths(strippedPaths, nestedPath + prefix + key, suffix);
            }
        }
    }
227613
def extend_path():
    
    if ROOT not in sys.path:
        sys.path.insert(0, ROOT)

    if LIB not in sys.path:
        sys.path.insert(0, LIB)
1041825
function initPaths (args) {
    // set path where controller is mounted
    this.path = typeof args.path === 'string' ? args.path : ''
    // create paths if not already defined
    if (!this.paths) {
        this.paths = {}
    }
    // if paths is false then do not create any paths
    if (args.paths === false) {
        return
    }
    // get paths object
    var paths = requireValidOptionalObject(args.paths)
    // configure default paths and create paths from args
    _.each(args.paths, (methods, path) => {
        // if value is false then delete all default controllers for path
        if (methods === false) {
            delete this.paths[path]
            return
        }
        // iterate over methods for path
        _.each(methods, (spec, method) => {
            // if spec is false the delete any default controller for method
            if (spec === false) {
                // if path does not exist do nothing
                if (!this.paths[path]) {
                    return
                }
                // delete all entries for method
                delete this.paths[path][method]
                return
            }
            // if path does not exist create
            if (!this.paths[path]) {
                this.paths[path] = {}
            }
            // if methods does not exist create
            if (!this.paths[path][method]) {
                this.paths[path][method] = []
            }
            // args value is list of controllers for different roles
            if (Array.isArray(spec)) {
                // either add each spec or merge to existing spec
                _.each(spec, spec => {
                    // default role to all
                    if (!spec.role) {
                        spec.role = 'all'
                    }
                    // get existing controller if defined
                    var controller = this.getController(method, path, spec.role)
                    // if controller exists then merge config
                    if (controller) {
                        _.merge(controller, spec)
                    }
                    // otherwise add new controller spec
                    else {
                        this.paths[path][method].push(spec)
                    }
                })
            }
            // if spec is an object then either apply arguments to existing
            // default controller or create new controller
            else if (spec && typeof spec === 'object') {
                // default role to all
                if (!spec.role) {
                    spec.role = 'all'
                }
                // get existing controller if defined
                var controller = this.getController(method, path, spec.role)
                // if controller exists then merge config
                if (controller) {
                    _.merge(controller, spec)
                }
                // otherwise add new controller spec
                else {
                    this.paths[path][method].push(spec)
                }
            }
            // error
            else {
                throw new Error('invalid controller '+spec+' at '+path+' '+method)
            }
        })
    })
    // iterate over paths validating spec and creating methods
    _.each(this.paths, (methods, path) => {
        // iterate over (http) methods
        _.each(methods, (specs, httpMethod) => {
            // require supported http method
            assert.ok(httpMethods[httpMethod], 'invalid http method '+httpMethod+' for '+path)
            // iterate specs for different roles
            _.each(specs, spec => {
                // if spec is GET and has a template but no method
                // then do not require method
                if (spec.template && !spec.after && !spec.before && !spec.method) {
                    return
                }
                // if function is passed then construct spec
                if (typeof spec === 'function') {
                    spec = {method: spec}
                }
                // create default method if method not defined
                if (!spec.method) {
                    spec.method = function (args) {return args}
                }
                // create method name
                if (!spec.methodName) {
                    // get method name from function
                    var matches = spec.method.toString().match(/function\s*([^\s^\)]+)\s*\(/)
                    // use function name
                    if (matches && matches[1].length) {
                        spec.methodName = matches[1]
                    }
                    // use path and method for method name
                    else {
                        // remove non-word chars
                        path = path.replace(/\W/, '')
                        // set method name as methodPath
                        spec.methodName = httpMethod+ucfirst(path)
                    }
                }
                // if method is already immutable then leave as is so that the same
                // spec can be shared between routes
                if (spec.method.meta) {
                    return
                }
                // get method signature from module and method name
                var methodSignature = this.moduleName+'.'+spec.methodName
                // create immutable method
                spec.method = immutable.method(methodSignature, spec.method)
                // if there are before functions add
                if (spec.before) {
                    var beforeMethodName = spec.methodName+'Before'
                    // create immutable method
                    spec.before = immutable.method(this.moduleName+'.'+beforeMethodName, spec.before)
                    // bind before method
                    immutable.before(methodSignature, spec.before)
                }
                // if there are after functions add
                if (spec.after) {
                    var afterMethodName = spec.methodName+'After'
                    // create immutable method
                    spec.after = immutable.method(this.moduleName+'.'+afterMethodName, spec.after)
                    // find after method
                    immutable.after(methodSignature, spec.after)
                }
            })
        })
    })
}
1104491
@GwtIncompatible("Unnecessary")
  private static void maybeCreateDirsForPath(String pathPrefix) {
    if (!Strings.isNullOrEmpty(pathPrefix)) {
      String dirName =
          pathPrefix.charAt(pathPrefix.length() - 1) == File.separatorChar
              ? pathPrefix.substring(0, pathPrefix.length() - 1)
              : new File(pathPrefix).getParent();
      if (dirName != null) {
        new File(dirName).mkdirs();
      }
    }
  }
622062
function setPath(obj, path, value) {
	var cur = obj;
	var parts = path.split('.');
	var i;
	for (i = 0; i < parts.length; i++) {
		if (i === parts.length - 1) {
			cur[parts[i]] = value;
		} else {
			if (isScalar(cur[parts[i]])) cur[parts[i]] = {};
			cur = cur[parts[i]];
		}
	}
	return obj;
}
701928
private Path getPath(PropertyWriter writer, JsonStreamContext sc) {
        LinkedList<PathElement> elements = new LinkedList<>();

        if (sc != null) {
            elements.add(new PathElement(writer.getName(), sc.getCurrentValue()));
            sc = sc.getParent();
        }

        while (sc != null) {
            if (sc.getCurrentName() != null && sc.getCurrentValue() != null) {
                elements.addFirst(new PathElement(sc.getCurrentName(), sc.getCurrentValue()));
            }
            sc = sc.getParent();
        }

        return new Path(elements);
    }
981809
@Override
	protected void addPaths(Set<String> paths, Collection<Map<String, Object>> commits) {
		paths.add("application.yml");
	}
665604
function(paths) {
			var base = Script.current(this).absolute;
			each(paths, function(item, index) {
				var path = paths[index] = URL.absolute(URL.clean(item), base);
				if (path[path.length - 1] !== '/') {
					paths[index] += '/';
				}
			});
			return paths;
		}
730892
def _expand_paths(self, paths):
        """"""
        paths = ninja_syntax.as_list(paths)
        return ' '.join(map(self._shell_escape, (map(self._expand, paths))))
116265
def extra_paths():
    
    # TODO - this is only tested on Ubuntu for now
    #        there must be a better way of getting
    #        the sip directory.
    dirs = {}
    try:
        @vext.env.run_in_syspy
        def run(*args):
            import sipconfig
            config = sipconfig.Configuration()
            dirs = {
                "sip.default_sip_dir": config.default_sip_dir,
            }
            return dirs
        dirs = run()
        return dirs
    except ImportError:
        return dirs
1317097
protected function setPaths()
    {
        $pathPackage = realpath(__DIR__.'/../../../../');
        $pathBase = realpath(base_path());

        // Set CLI path.
        $this->pathCli = $pathBase.'/vendor/bin/'.$this::CLI_TOOL;
        if (!file_exists($this->pathCli)) {
            $this->pathCli = $pathPackage.'/vendor/bin/'.$this::CLI_TOOL;
        }

        // Set ruleset paths.
        $this->pathRulesetStock = $pathPackage.'/rulesets/'.$this::CLI_TOOL.'.xml';
        $this->pathRulesetLocal = $pathBase.'/'.$this::CLI_TOOL.'.xml';
        $this->pathRulesetLocalLegacy = $pathBase.'/app/'.$this::CLI_TOOL.'.xml';

        // Set active ruleset.
        $this->pathRuleset = $this->pathRulesetStock;
        if (is_readable($this->pathRulesetLocal)) {
            $this->pathRuleset = $this->pathRulesetLocal;
        } elseif (is_readable($this->pathRulesetLocalLegacy)) {
            $this->pathRuleset = $this->pathRulesetLocalLegacy;
        }
    }
144503
def set_paths(etc_paths = [ "/etc/" ]):
    
    global _ETC_PATHS
    _ETC_PATHS = []
    for p in etc_paths:
        _ETC_PATHS.append(os.path.expanduser(p))