def _directory_model_from_db(self, record, content):
model = base_directory_model(to_api_path(record['<STR_LIT:name>']))<EOL>if content:<EOL><INDENT>model['<STR_LIT>'] = '<STR_LIT>'<EOL>model['<STR_LIT:content>'] = list(<EOL>chain(<EOL>self._convert_file_records(record['<STR_LIT>']),<EOL>(<EOL>self._directory_model_from_db(subdir, False)<EOL>for subdir in record['<STR_LIT>']<EOL>),<EOL>)<EOL>)<EOL><DEDENT>return model<EOL>
Build a directory model from database directory record.