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

The problem with File::create is that it must interoperate with the existing OSes. And it turns out, File::create can fail for many many reasons. Your file can be on disk, it can be remotely accessible on the network, it can be virtual, etc... And the OS can return just about any error. Linux lists the errors returned on each operation, but they're really just advisory and not exhaustive.

So for io::Error, we're basically constrained by what the OS provides. Not much Rust can do about it, I'm afraid.



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

Search: