base: File API

I think the latter example is good enough here. rather than the inline example above.