File.separator的作用 == 路径中的分隔符/ 或者 \(Function of file.separator = = separator in path and / or\)

在windows系统下,路径分隔符是\,比如C:windows\server….

在Linux系统下,分隔符是/ ,比如:C:windows/server….

引发的问题:不同操作系统下操作,会导致报 No such file or diretory异常(找不到文件)
File.separator 在代码中充当分隔符。用于解决这种冲突

————————

In Windows system, the path separator is \, such as C: Windows \ server

Under Linux system, the separator is /. For example, C: Windows / server

Caused problem: operating under different operating systems will result in no such file or directory exception (file not found)
The file.separator acts as a separator in the code. Used to resolve this conflict