Compound field that includes a file field I'm trying to figure out how to create a custom compound field, but I'm not quite sure how to add a file field to it.  There are plenty of tuts on creating compound fields that are comprised of text fields, but I can't find any that talk about combining text and file fields.  I guess the main problem is that I don't understand how the 'schema' function would work, since it refers to Drupal data types, but the data uploaded via the file field won't be stored in the Drupal database, but rather stored on disk, as any other uploaded file would be.

Can someone point me in the right direction?
A file field is an entity reference field pointing to the File entity (or in D8.4 to the Media entity). To build such a file field extend FileItem (which parent is EntityReferenceItem). An example for this would be the image field ImageItem, which is a compound field adding properties like title, alt, height and width:

ImageItem::propertyDefinitions()

public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
    $properties = parent::propertyDefinitions($field_definition);

    unset($properties['display']);
    unset($properties['description']);

    $properties['alt'] = DataDefinition::create('string')
      -&gt;setLabel(t('Alternative text'))
      -&gt;setDescription(t("Alternative image text, for the image's 'alt' attribute."));

    $properties['title'] = DataDefinition::create('string')
      -&gt;setLabel(t('Title'))
      -&gt;setDescription(t("Image title text, for the image's 'title' attribute."));

    $properties['width'] = DataDefinition::create('integer')
      -&gt;setLabel(t('Width'))
      -&gt;setDescription(t('The width of the image in pixels.'));

    $properties['height'] = DataDefinition::create('integer')
      -&gt;setLabel(t('Height'))
      -&gt;setDescription(t('The height of the image in pixels.'));

    return $properties;
  }


The properties for the referencing part are inherited from the parent.