【发布时间】:2023-03-18 05:41:01
【问题描述】:
Python 有 os.path.dirname 和 os.path.sep。如何在 Java 中获取这些值?
【问题讨论】:
Python 有 os.path.dirname 和 os.path.sep。如何在 Java 中获取这些值?
【问题讨论】:
在谷歌上搜索了一下 os.path.dirname 和 os.path.sep 实际上是什么
os.path.dirname(path) 将是 filePath.split(System.getProperty("path.separator"))[0]
os.path.sep 将是 System.getProperty("file.separator")
【讨论】: