def _file_model_from_db(self, record, content, format):
<EOL>path = to_api_path(record['<STR_LIT>'] + record['<STR_LIT:name>'])<EOL>model = base_model(path)<EOL>model['<STR_LIT:type>'] = '<STR_LIT:file>'<EOL>model['<STR_LIT>'] = model['<STR_LIT>'] = record['<STR_LIT>']<EOL>if content:<EOL><INDENT>bcontent = record['<STR_LIT:content>']<EOL>model['<STR_LIT:content>'], model['<STR_LIT>'], model['<STR_LIT>'] = from_b64(<EOL>path,<EOL>bcontent,<EOL>format,<EOL>)<EOL><DEDENT>return model<EOL>
Build a file model from database record.