code: function serializeFile(file) {
  
    // preserve path, source, and file-save props
    var o = u.pick(file, 'path', '_oldtext', '_dirty');
  
    // recreate file.text from serialized fragments
    // new or modifified fragments should delete file.text
    o.text = file.text || serializeTextFragments(file);
  
    return o;
  }
docs: return serializable file object