Resolve a path and return a ``(handler, urlargs)`` tuple or
        ``None`` if the path could not be resolved.
768004
def _resolve(self, path, method, urlargs=None):
        '''
        '''
        match = self.route.match(path)
        if match is None:
            if not self.route.is_leaf:  # no match
                return
        elif '__remaining__' in match:
            path = match.pop('__remaining__')
            urlargs = update_args(urlargs, match)
        else:
            handler = getattr(self, method, None)
            if handler is None:
                raise MethodNotAllowed
            response_wrapper = self.response_wrapper
            if response_wrapper:
                handler = partial(response_wrapper, handler)
            return Handler(self, handler, update_args(urlargs, match))
        #
        for handler in self.routes:
            view_args = handler._resolve(path, method, urlargs)
            if view_args is None:
                continue
            return view_args
899539
public Optional<URL> resolve(String resourcePath) {
        for (Map.Entry<String, List<ResourceLoader>> entry : resourceMappings.entrySet()) {
            List<ResourceLoader> loaders = entry.getValue();
            String mapping = entry.getKey();
            if (!loaders.isEmpty() && pathMatcher.matches(mapping, resourcePath)) {
                String path = pathMatcher.extractPathWithinPattern(mapping, resourcePath);
                //A request to the root of the mapping
                if (StringUtils.isEmpty(path)) {
                    path = INDEX_PAGE;
                }
                if (path.startsWith("/")) {
                    path = path.substring(1);
                }
                for (ResourceLoader loader : loaders) {
                    Optional<URL> resource = loader.getResource(path);
                    if (resource.isPresent()) {
                        return resource;
                    } else {
                        if (path.indexOf('.') == -1) {
                            if (!path.endsWith("/")) {
                                path = path + "/";
                            }
                            path += INDEX_PAGE;
                            resource = loader.getResource(path);
                            if (resource.isPresent()) {
                                return resource;
                            }
                        }
                    }
                }
            }
        }

        return Optional.empty();
    }
493964
def resolve_path(path):
    """"""
    if path[0] == '~':
        # ~ or ~user
        path = os.path.expanduser(path)
    if path[0] != '/':
        # Relative path
        if cur_dir[-1] == '/':
            path = cur_dir + path
        else:
            path = cur_dir + '/' + path
    comps = path.split('/')
    new_comps = []
    for comp in comps:
        # We strip out xxx/./xxx and xxx//xxx, except that we want to keep the
        # leading / for absolute paths. This also removes the trailing slash
        # that autocompletion adds to a directory.
        if comp == '.' or (comp == '' and len(new_comps) > 0):
            continue
        if comp == '..':
            if len(new_comps) > 1:
                new_comps.pop()
        else:
            new_comps.append(comp)
    if len(new_comps) == 1 and new_comps[0] == '':
        return '/'
    return '/'.join(new_comps)
1315120
function resolvePaths(paths) {
  var exec = {};
  var originalWd = process.cwd();
  for (var name in paths) {
    process.chdir(originalWd);
    exec[name] = resolveLink(paths[name]);
    process.chdir(originalWd);
  }
  process.chdir(originalWd);
  return exec;
}
1155254
def from_path(cls, path):
    
    if os.path.exists(path) is False:
      raise errors.InvalidPathError(path)
    return cls(path=path)
617876
def resolving(self, ref):
        

        url, resolved = self.resolve(ref)
        self.push_scope(url)
        try:
            yield resolved
        finally:
            self.pop_scope()
573914
def ensurepath(path_, verbose=None):
    
    if verbose is None:
        verbose = VERYVERBOSE
    return ensuredir(path_, verbose=verbose)
669561
function resolvePath(_path, relativePath = currentWorkDir) {
  if (!isString(_path) || _path.startsWith('~')) {
    return _path;
  }
  const file = nativePath.relative(relativePath, _path);
  return nativePath.join(relativePath, file);
}
166462
def _maybe_handle(self, prefix, handler, path, params, data=None):
    """"""
    if path.startswith(prefix):
      relpath = path[len(prefix):]
      if data:
        handler(relpath, params, data)
      else:
        handler(relpath, params)
      return True
    else:
      return False
942882
def _resolve_symlink(path, max_depth=64):
    '''
    
    '''
    if sys.getwindowsversion().major < 6:
        raise SaltInvocationError('Symlinks are only supported on Windows Vista or later.')

    # make sure we don't get stuck in a symlink loop!
    paths_seen = set((path, ))
    cur_depth = 0
    while is_link(path):
        path = readlink(path)
        if path in paths_seen:
            raise CommandExecutionError('The given path is involved in a symlink loop.')
        paths_seen.add(path)
        cur_depth += 1
        if cur_depth > max_depth:
            raise CommandExecutionError('Too many levels of symbolic links.')

    return path
432643
def _resolve_child(self, path):
        ''
        obj = self

        for component in path.split('.'):
            ptr = obj
            if not isinstance(ptr, Permuter):
                raise self.MessageNotFound("Bad element path [wrong type]")

            # pylint: disable=protected-access
            found_gen = (_ for _ in ptr._generators if _.name() == component)

            obj = next(found_gen, None)

            if not obj:
                raise self.MessageNotFound("Path '{}' unresolved to member."
                                           .format(path))
        return ptr, obj
459332
def _resolve(cls, path, factory_file):
        
        variables = {}

        name = factory_file
        factory_file = os.path.join(path, factory_file)

        with open(factory_file) as fh:
            exec(fh.read(), {}, variables)

        klass = variables[inflection.camelize(name)]

        instance = klass()

        return instance
1217926
function resolve (cid, path, callback) {
    let value, remainderPath
    doUntil(
      (cb) => {
        self.block.get(cid, (err, block) => {
          if (err) return cb(err)

          const r = self._ipld.resolvers[cid.codec]

          if (!r) {
            return cb(new Error(`No resolver found for codec "${cid.codec}"`))
          }

          r.resolver.resolve(block.data, path, (err, result) => {
            if (err) return cb(err)
            value = result.value
            remainderPath = result.remainderPath
            cb()
          })
        })
      },
      () => {
        if (value && value['/']) {
          // If we've hit a CID, replace the current CID.
          cid = new CID(value['/'])
          path = remainderPath
        } else if (CID.isCID(value)) {
          // If we've hit a CID, replace the current CID.
          cid = value
          path = remainderPath
        } else {
          // We've hit a value. Return the current CID and the remaining path.
          return true
        }

        // Continue resolving unless the path is empty.
        return !path || path === '/'
      },
      (err) => {
        if (err) return callback(err)
        callback(null, { cid, remainderPath: path })
      }
    )
  }
352533
def patch(self, path=None, method='PATCH', **options):
        
        return self.route(path, method, **options)
462134
def resolve_path(self, filename, skip='', skip_original='',
                     default_template=None):
        
        def _file(filename, dirs):
            for d in dirs:
                _f = os.path.normpath(os.path.join(d, filename))
                if os.path.exists(_f):
                    yield _f
            raise StopIteration

        filename = os.path.normpath(filename)
        skip = os.path.normpath(skip)
        skip_original = os.path.normpath(skip_original)

        if os.path.exists(filename):
            return filename

        if filename and self.dirs:
            _files = _file(filename, self.dirs)
            if skip_original == filename:
                for f in _files:
                    if f == skip:
                        break

            for f in _files:
                if f != skip:
                    return f
                else:
                    continue

        if default_template:
            if not isinstance(default_template, (tuple, list)):
                default_template = [default_template]
            for x in default_template:
                filename = self.resolve_path(x)
                if filename:
                    return filename
707350
boolean resolvesTo(HttpMethods hm, String p) {
		return(path.equals(p) && hm.equals(meth));
	}
1077890
def path_helper(self, operations, urlspec, **kwargs):
        """"""
        if not isinstance(urlspec, URLSpec):
            urlspec = URLSpec(*urlspec)
        for operation in self._operations_from_methods(urlspec.handler_class):
            operations.update(operation)
        if not operations:
            raise APISpecError(
                'Could not find endpoint for urlspec {0}'.format(urlspec),
            )
        params_method = getattr(urlspec.handler_class, list(operations.keys())[0])
        operations.update(self._extensions_from_handler(urlspec.handler_class))
        return self.tornadopath2openapi(urlspec, params_method)