base: File API

Missing:

* Binary files
* File removals
* Unit tests
* Docs as docbook, fix typos etc
I think that streaming is not necessary for this iteration.