C-API; File implementation