In C#, paths are usually represented by a string and then operated upon by static methods from the static Path class. Why isn't there a class like java.nio.file.Path instead? Such a class would naturally handle platform independent path separators for example.
I'm not asking for a library that implements a (non-static) Path class. I'm asking why the standard library has been designed that way.
Because they had to make a design choice, and they chose that one. It occurs, though, that lots of java file-related classes (FileReader, FileOutputStream, etc) also use just a string. It is clear, simple, and gets the job done.
For things like path separators: the Path class in .NET has utility methods for that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With