直接上图:

join

node的path.join 和 path.resolve的区别

resolve

node的path.join 和 path.resolve的区别

明显可以看出,join只会帮你把路径连接起来,而resolve会以当前路径为父路径来把你提供的路径连接起来

相关文章:

  • 2021-06-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-30
  • 2023-03-21
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案