base: File API

Yes, this is unwieldy here.  Done.