base: File API

Done.