Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

At least since Java 7, the API has a concept of a filesystem which can create filesystem-specific Path objects and, if it encounters illegal characters, throws an InvalidPathException that tells you which character was illegal.


Sounds tricky to get right, considering the filesystem can change in the middle of a path.


I haven't worked extensively with the API, but I believe that it represents filesystem instances accessible to the JVM, not abstract technical filesystems.

So in the case of a Unix filesystem tree with various mount points, the FileSystem object would throw the exception iff the path you're trying to construct is illegal for the actual filesystem configuration in the system.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: