base: File API

Missing:

* Docs as docbook, fix typos etc
It can throw an exception, I guess...  Should we catch it?  However, I don't think there should be a need to give up.  Is there?  Maybe slowing down is enough?