Tag: 绝对路径

如何找到两条绝对路径的相对路径?

给出两条绝对路径,例如 /a/path/to/a /a/path/to/somewhere/else 我怎样才能获得从一个到另一个的相对路径, ../a ? 从某种意义上说,与realpath相反。