public static interface FileTypeRegistry.FileTypeDetector
Modifier and Type | Field and Description |
---|---|
static ExtensionPointName<FileTypeRegistry.FileTypeDetector> |
EP_NAME |
Modifier and Type | Method and Description |
---|---|
FileType |
detect(VirtualFile file,
ByteSequence firstBytes,
java.lang.CharSequence firstCharsIfText)
Detects file type by its (may be binary) content on disk.
|
default int |
getDesiredContentPrefixLength()
Defines how much content is required for this detector to detect file type reliably.
|
default java.util.Collection<? extends FileType> |
getDetectedFileTypes()
Deprecated.
unused
|
int |
getVersion() |
static final ExtensionPointName<FileTypeRegistry.FileTypeDetector> EP_NAME
FileType detect(VirtualFile file, ByteSequence firstBytes, java.lang.CharSequence firstCharsIfText)
ProcessCanceledException
)file
- to analyzefirstBytes
- of the file for identifying its file typefirstCharsIfText
- - characters, converted from first bytes parameter if the file content was determined to be text, or null otherwise@Deprecated default java.util.Collection<? extends FileType> getDetectedFileTypes()
default int getDesiredContentPrefixLength()
detect(VirtualFile, ByteSequence, CharSequence)
if present.int getVersion()