TestFileAttachmentMetadataEvent (Gradle API 9.7.1)
Description: declaration: package: org.gradle.tooling.events.test, interface: TestFileAttachmentMetadataEvent

# Interface TestFileAttachmentMetadataEvent

All Superinterfaces:
  `ProgressEvent, TestMetadataEvent`

@NullMarked @Incubating public interface TestFileAttachmentMetadataEvent extends TestMetadataEvent
An event emitted by tests that contains file attachment data.

Since:
  9.4.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `File`
  `getFile()`
  The published file attachment.
  `@Nullable String`
  `getMediaType()`
  Media type of the file, if known.

  ### Methods inherited from interface ProgressEvent

  `getDescriptor, getDisplayName, getEventTime`

- ## Method Details

  - ### getFile

    File getFile()
    The published file attachment. The path may represent a single file or a directory.
    Returns:
      the file
    Since:
      9.4.0

  - ### getMediaType

    @Nullable String getMediaType()
    Media type of the file, if known. This is used to declare the general type of data provided by the file.

    A media type may be provided by the publishing test or omitted. Some files, like directories, do not have a conventional media type.

    Returns:
      media type, may be `null`
    Since:
      9.4.0