Ulf Zibis wrote:
:
At least, IMO, fileSeparator() and pathSeparator() would belong to java.io.File or java.nio.file.FileSystem.
As I think Martin pointed out, File.separator and File.pathSeparator have always been there. They should of course have been methods rather than fields. In theory the separators could be more than a single character but it's hard to find examples. One could debate as to if File was the right place to define the path separator as the concept of path is more of a shell or system concept. It's also worth pointing out that FileSystem already defines a getSeparator method. In the case of the default FileSystem then it will return the same as File.separator. When additional providers are installed then they may use different separators of course.

-Alan.






Reply via email to