Java中的Python os.path.dirname和os.path.sep?

时间:2017-12-04 19:20:10

标签: java python

Python有os.path.dirname和os.path.sep。如何在Java中获取这些值?

1 个答案:

答案 0 :(得分:0)

os.path.dirnameos.path.sep实际上

的内容进行了一些Google搜索

os.path.dirname(path)将为filePath.split(System.getProperty("path.separator"))[0]

os.path.sep将为System.getProperty("file.separator")