获得该路径的配置信息
@param pathname
@private
763413
function(pathname) {
        // 如果在路径配置中显示忽略这个路径，那就直接忽略之
        var ignore = this._options.ignore;
        if (ignore) {
            if (pathname.indexOf(ignore) == 0) {
                return false;
            }
        }

        // 如果不存在配置信息，那就直接返回
        var pathsConfig = this._config.paths;
        if (!pathsConfig) return null;

        var path2RegMap = this._path2RegMap;
        for (var path in pathsConfig) {
            var reg = path2RegMap[path] || (path2RegMap[path] = path2reg(path, []));
            if (reg.test(pathname)) {
                return pathsConfig[path];
            }
        }

        return null;
    }
356916
function getPathVariableName() {
    // windows calls it's path 'Path' usually, but this is not guaranteed.
    if (process.platform === 'win32') {
        for (const key of Object.keys(process.env))
            if (key.match(/^PATH$/i))
                return key;
        return 'Path';
    }
    return "PATH";
}
1286
function ignoreMatch(ignores, pathName) {
    let result = false;

    ignores.forEach(ignore => {
        if (minimatch(pathName, ignore)) {
            result = true;
        }
    });

    return result;
}
130305
function pathIsActive(pathname, currentPathname) {
  // Normalize leading slash for consistency. Leading slash on pathname has
  // already been normalized in isActive. See caveat there.
  if (currentPathname.charAt(0) !== '/') {
    currentPathname = '/' + currentPathname;
  }

  // Normalize the end of both path names too. Maybe `/foo/` shouldn't show
  // `/foo` as active, but in this case, we would already have failed the
  // match.
  if (pathname.charAt(pathname.length - 1) !== '/') {
    pathname += '/';
  }
  if (currentPathname.charAt(currentPathname.length - 1) !== '/') {
    currentPathname += '/';
  }

  return currentPathname === pathname;
}
76209
static boolean objectHasDirectoryPath(String objectName) {
    return !Strings.isNullOrEmpty(objectName)
        && objectName.endsWith(GoogleCloudStorage.PATH_DELIMITER);
  }
1110746
public static <Param> PathParamSerializer<Param> required(String name, Function<String, Param> deserialize,
                                                              Function<Param, String> serialize) {
        return new NamedPathParamSerializer<Param>(name) {
            @Override
            public PSequence<String> serialize(Param parameter) {
                return TreePVector.singleton(serialize.apply(parameter));
            }

            @Override
            public Param deserialize(PSequence<String> parameters) {
                if (parameters.isEmpty()) {
                    throw new IllegalArgumentException(name + " parameter is required");
                } else {
                    return deserialize.apply(parameters.get(0));
                }
            }
        };
    }
913916
@InterfaceAudience.Private
    private String pathForDatabaseNamed(String name) {
        if ((name == null) || (name.length() == 0) || Pattern.matches(LEGAL_CHARACTERS, name))
            return null;
        // NOTE: CouchDB allows forward slash as part of database name.
        //       However, ':' is illegal character on Windows platform.
        //       For Windows, substitute with period '.'
        name = isWindows() ? name.replace('/', '.') : name.replace('/', ':');
        String result = directoryFile.getPath() + File.separator + name + Manager.kDBExtension;
        return result;
    }
938116
String getPathName(boolean url) {
        if (pathName == null || pathName.isEmpty()) {
            VirtualFile[] path = getParentFiles();
            final StringBuilder builder = new StringBuilder(path.length * 30 + 50);
            for (int i = path.length - 1; i > -1; i--) {
                final VirtualFile parent = path[i].parent;
                if (parent == null) {
                    builder.append(path[i].name);
                } else {
                    if (parent.parent != null) {
                        builder.append('/');
                    }
                    builder.append(path[i].name);
                }
            }
            pathName = builder.toString();
        }
        // Perhaps this should be cached to avoid the fs stat call?
        return (url && isDirectory()) ? pathName.concat("/") : pathName;
    }
1108747
public ArrayList<PathImpl> getResources(String pathName)
  {
    ArrayList<PathImpl> list = new ArrayList<PathImpl>();

    String pathname = _pathname;
    // XXX: why was this here?
    if (pathname.startsWith("/"))
      pathname = "." + pathname;

    ArrayList<PathImpl> pathList = ((MergePath) _root)._pathList;
    for (int i = 0; i < pathList.size(); i++) {
      PathImpl path = pathList.get(i);

      path = path.lookup(pathname);

      ArrayList<PathImpl> subResources = path.getResources(pathName);
      for (int j = 0; j < subResources.size(); j++) {
        PathImpl newPath = subResources.get(j);

        if (! list.contains(newPath))
          list.add(newPath);
      }
    }

    return list;
  }
1258872
function setPath(uri) {
  if (uri.path || (uri.pathname === undefined && uri.search === undefined)) return;

  uri.path = '';
  if (uri.pathname) uri.path += uri.pathname;
  if (uri.search) uri.path += uri.search;
}
1201543
function logInfo (name) {
    let aliases = keys.filter(k => k !== name && name === entries[k].name);

    if (aliases.length) {
        aliases.sort();
        aliases = ` (aka: "${aliases.join('", "')}")`;
    }
    else {
        aliases = '';
    }

    console.log(` - [\`${name}\`](docs/${name}.md)${aliases}`);

    let path = $path.join(__dirname, `docs/${name}.md`);
    let md = 'TODO';

    try {
        $fs.readFileSync(path);
    }
    catch (e) {
        $fs.writeFileSync(path, `# ${name}\n\nTODO`);
    }
}
580861
function() {
      var path = this.decodeFragment(
        this.location.pathname + this.getSearch()
      ).slice(this.root.length - 1);
      return path.charAt(0) === '/' ? path.slice(1) : path;
    }
487295
function replace(pathname) {
        if (typeof routesMap === 'function') {
            return routesMap(pathname) || pathname
        }

        let matched = false
        return pathname
            .split('/')
            .map(chunk => {
                // console.log(chunk);
                if (!matched) {
                    if (routesMap[chunk]) {
                        matched = true
                    }
                    return typeof routesMap[chunk] === 'string' ? routesMap[chunk] : chunk
                }
                else {
                    return chunk
                }
            })
            .join('/')
            .replace(/\/\//, '/')
    }
40926
function (data, path) {
    path = path || '';
    if (_.isObject(data)) {
      for (var key in data) {
        if (_.isObject(data)) {
          data[key] = _recurseFeedDefaultNamespace(data[key], path !== '' ? path + '.' + key : key);
        }
      }
      return data;
    }
    else {
      if (data == null || data === '') {
        // return default data if empty/null
        return path;
      }
      else {
        return data;
      }
    }
  }
867453
function getFileInfo (fileName) {
    var result = {};
    result.name = fileName;
    result.exists = fs.existsSync (fileName);
    if (result.exists) {
        var stats = fs.statSync (fileName);
        result.isFile = stats.isFile ();
        result.isDirectory = stats.isDirectory ();
    }
    else {
        result.isFile = false;
        result.isDirectory = false;
    }
    
    return (result);
}
1346676
function getNameFromPath (path) {
  path = _(path).toString();
  let lastSlash = path.substring(0, path.length - 1).lastIndexOf("/");
  if (lastSlash === -1) {
    return normalizeName(path);
  }
  else {
    return normalizeName(path.substring(lastSlash));
  }
}
765330
function checkPath(id)
{
  var i;

  for (i = 0; i < this.pathsKeys.length; i++)
  {
    if (id.indexOf(this.pathsKeys[i]) == 0)
    {
      if (this.paths[this.pathsKeys[i]] == 'empty:')
      {
        id = 'empty:';
      }
      else
      {
        id = id.replace(this.pathsKeys[i], this.paths[this.pathsKeys[i]]);
      }
      break;
    }
  }

  return id;
}