FileFormat

data class FileFormat<T>(val canonicalName: String, val extensions: Array<String>, val canRead: Boolean, val canWrite: Boolean, val basis: String?, val formatKey: String, val transcoder: Transcoder<T>)

A file format which is often specified by a single definition or a single suffix. For example, PNG can be a file type and is a different file type from JPEG.

A file format can have a wild card transcoder defined using the optional transcoder parameter. It is often implemented for often esoteric formats; for example, often converting to JPEG requires the removal of the alpha channel, which means JPEG has a custom transcoder parameter that removes the alpha channel.

Constructors

Link copied to clipboard
constructor(canonicalName: String, extensions: Array<String>, canRead: Boolean, canWrite: Boolean, basis: String?, formatKey: String, transcoder: Transcoder<T>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

The display name to use to show to the user

Link copied to clipboard

Pre-defined constants for the builtin processors.

Link copied to clipboard

Pre-defined constants for the builtin processors.

Link copied to clipboard

The suffixes used, best to define only one.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun isOf(extension: String): Boolean

Checks whether extension is a valid extension inside of this file type.

Link copied to clipboard
fun isValid(file: File): Boolean

Checks whether the parameter is an actual file part of this file type

fun isValid(path: Path): Boolean

Calls isValid but turns path object into a File object

Link copied to clipboard
open override fun toString(): String