public static Attachment fromTextFile( File file, MediaType mediaType ) throws IOException {
        return fromText( Files.asCharSource( file, mediaType.getCharset() ).read(), mediaType );
    }
Creates a non-binary attachment from the given file.
@throws IOException if an I/O error occurs
@throws java.lang.IllegalArgumentException if mediaType is either binary or has no specified charset
jgiven-core/src/main/java/com/tngtech/jgiven/attachment/Attachment.java