Texture file path resolver. User can override it
@param {string} path
14116
function (path) {
        if (path && path.match(/^data:(.*?)base64,/)) {
            return path;
        }

        var rootPath = this.textureRootPath;
        if (rootPath == null) {
            rootPath = this.rootPath;
        }
        return util$1.relative2absolute(path, rootPath);
    }
1095510
function findPackages(path) {
  return new Promise(function (resolve, reject) {
    (0, _glob.glob)(path, function (err, res) {
      if (err) {
        reject(err);
      }
      resolve(res.filter(function (file) {
        return file.endsWith('.json');
      }));
    });
  });
}
1283995
function resolvePaths(processDirectory, cliConfig) {
  logger.debug('resolvePaths', processDirectory, cliConfig);

  const overrides = cliConfig || {};
  // Locate and read package.json
  const packageJsonFile = path.resolve(
    findup.sync(processDirectory, 'package.json'),
    'package.json'
  );
  const baseDir = path.dirname(packageJsonFile);

  const config = Object.assign(
    {},
    getConfigSettings(packageJsonFile, baseDir),
    overrides
  );
  const outputFile = path.resolve(baseDir, config.outputFile);

  const outputFiles = [
    {
      outputFile,
      patterns: config.searchDir.map(dir =>
        path.resolve(baseDir, dir, config.pattern)
      ),
    },
  ];

  const returnValue = {
    outputFiles,
  };
  logger.debug('resolvePaths', returnValue);
  return returnValue;
}
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);
        }
    }
}
391928
function _getContextsFromPath(path) {
  const allContexts = {
    add: [],
    remove: [],
  }
  _each(_pathContexts, pathContext => {
    let contextAdded = false
    const contexts = pathContext.contexts
    const regexes = pathContext.regexes
    const paths = pathContext.paths

    _each(regexes, regex => {
      regex.lastIndex = 0
      const matches = regex.exec(path)
      if (matches && matches.length > 0) {
        const contextsToAdd = []
        _each(contexts, context => {
          const replacedContext = context.replace(
            _contextRegex,
            (match, group) => {
              return matches[group]
            },
          )
          contextsToAdd.push(replacedContext)
        })
        allContexts.add = allContexts.add.concat(contextsToAdd)
        contextAdded = true
      }
      return !contextAdded
    })

    if (!contextAdded) {
      _each(paths, pathToTry => {
        if (path === pathToTry) {
          allContexts.add = allContexts.add.concat(contexts)
          contextAdded = true
        }
        return !contextAdded
      })
      if (!contextAdded) {
        allContexts.remove = allContexts.remove.concat(contexts)
      }
    }
  })
  return allContexts
}
459356
function resolveConfigPath(configPath) {
	// Specify a default
	configPath = configPath || '.pa11yci';
	if (configPath[0] !== '/') {
		configPath = path.join(process.cwd(), configPath);
	}
	if (/\.js(on)?$/.test(configPath)) {
		configPath = configPath.replace(/\.js(on)?$/, '');
	}
	return configPath;
}
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)
678061
public ModulePath resolve(String path) {
    return new ModulePath(normalize(pathEscaper.escape(pathResolver.apply(path)), moduleRootPaths));
  }
753043
private function resolveFilePath($path)
    {
        $path = str_replace(array($this->_protocol.'://', '/'), array('', DIRECTORY_SEPARATOR), $path);

        foreach ($this->_includeExtensions as $ext) {
            $filename = $path.$ext;
            File::resolveFilepath($filename, null, array('include_path' => $this->_classcontentdir));
            if (true === is_file($filename)) {
                return $filename;
            }
        }

        return $path;
    }
620429
public static Bitmap renderPath(Path path) {
    RectF bounds = new RectF();
    path.computeBounds(bounds, false);
    Bitmap bitmap = Bitmap.createBitmap((int) bounds.right, (int) bounds.bottom, Bitmap.Config.ARGB_8888);
    Canvas canvas = new Canvas(bitmap);
    Paint paint = new LPaint();
    paint.setAntiAlias(true);
    paint.setColor(Color.BLUE);
    canvas.drawPath(path, paint);
    return bitmap;
  }
1001459
function drawPathOne(path, g, o, items) {
    var fill = o.fill, stroke = o.stroke, opac, lc, lw;

    path(g, items);

    opac = o.opacity == null ? 1 : o.opacity;
    if (opac == 0 || !fill && !stroke) return;

    if (fill) {
      g.globalAlpha = opac * (o.fillOpacity==null ? 1 : o.fillOpacity);
      g.fillStyle = color(g, o, fill);
      g.fill();
    }

    if (stroke) {
      lw = (lw = o.strokeWidth) != null ? lw : vg.config.render.lineWidth;
      if (lw > 0) {
        g.globalAlpha = opac * (o.strokeOpacity==null ? 1 : o.strokeOpacity);
        g.strokeStyle = color(g, o, stroke);
        g.lineWidth = lw;
        g.lineCap = (lc = o.strokeCap) != null ? lc : vg.config.render.lineCap;
        g.vgLineDash(o.strokeDash || null);
        g.vgLineDashOffset(o.strokeDashOffset || 0);
        g.stroke();
      }
    }
  }
535459
function resolveDependencies(self, paths) {
  var assets = [], cache = {};

  _.forEach(paths, function (p) {
    var asset;

    if (p === self.pathname) {
      if (!cache[p]) {
        cache[p] = true;
        assets.push(self);
      }
      return;
    }

    asset = self.environment.findAsset(p, { bundle: false });

    if (asset) {
      asset.__requiredAssets__.forEach(function (asset_dependency) {
        if (!cache[asset_dependency.pathname]) {
          cache[asset_dependency.pathname] = true;
          assets.push(asset_dependency);
        }
      });
    }
  });

  return assets;
}
911859
function resolver(filePath, callback) {
    var fullPath = path.join(this.config.publicPath, filePath);
    var options = {
      resourceURL: filePath,
      contents: fs.readFileSync(fullPath).toString()
    };

    // If we defined a custom browser-side message system, use it.
    if (this.update) {
      options.update = this.update;
    }
    // If we specified a `match` option for fb-flo notifications, use it.
    if (this.config.resolverMatch) {
      options.match = this.config.resolverMatch;
    }
    // If we defined an advanced reload mechanism (fb-flo only has true/false,
    // we also allow anymatch sets), use it.
    if (this.config.resolverReload) {
      options.reload = this.config.resolverReload(filePath);
    }

    // Hand the notification over to the fb-flo server.
    callback(options);
  }
131821
def resolve_path(filename: Path) -> typing.Union[Path, None]:
    
    current = Path.cwd()
    # Stop search at home directory
    sentinel_dir = Path.home().parent.resolve()
    while current != sentinel_dir:
        target = Path(current) / Path(filename)
        if target.exists():
            return target.resolve()
        else:
            current = current.parent.resolve()

    return None
645692
function resolveScriptPaths (filePath, m) {
  const toParse = [ m ]
  const lookup = {}   // key is module name, value is path

  while (toParse.length) {
    let node = toParse.pop()

    if (node.children)
      for (let n of node.children)
        toParse.push(n)

    if (!node.scripts)
      continue

    for (let entry of node.scripts) {
      let moduleName = camelcase(path.parse(entry.source).name)
      lookup[moduleName] = entry.source
      entry.module = moduleName
    }
  }

  return lookup
}
377044
function (url, baseDir, done) {
  resolve(url, {
    basedir: baseDir,
    extensions: [ '.scss', '.sass', '.css' ],
    pathFilter: function (pkg, absPath, relativePath) {
      var globbedPath = buildSassGlob(absPath);
      var paths = glob.sync(globbedPath);
      var resolvedPath = paths && paths[0];
      if (resolvedPath) {
        return path.join(path.dirname(relativePath), path.basename(resolvedPath));
      }
    }
  }, function (err, file) {
    if (err) return done(err);

    // Strip the extension so .css gets evaluated properly as .scss
    file = file.replace(/\.(js|(sa|sc|c)ss)$/, '');
    done(null, file);
  });
}
1057031
def _resolve_path(self, path):
        
        filepath = None
        mimetype = None

        for root, dirs, files in self.filter_files(self.path):
            # Does it exist in error path?
            error_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'error_templates', path)
            try:
                with open(error_path):
                    mimetype, encoding = mimetypes.guess_type(error_path)
                    filepath = error_path
            except IOError:
                pass

            # Does it exist in Tarbell blueprint?
            if self.base:
                basepath = os.path.join(root, self.blueprint_name, path)
                try:
                    with open(basepath):
                        mimetype, encoding = mimetypes.guess_type(basepath)
                        filepath = basepath
                except IOError:
                    pass

            # Does it exist under regular path?
            fullpath = os.path.join(root, path)
            try:
                with open(fullpath):
                    mimetype, encoding = mimetypes.guess_type(fullpath)
                    filepath = fullpath
            except IOError:
                pass

        return filepath, mimetype