base: File API

Missing:

* Docs as docbook, fix typos etc
Done.  (Needs docs.)