public interface FileType extends Scheme
com.intellij.fileType extension point or FileTypeFactory.
If file type depends on given file, FileTypeIdentifiableByVirtualFile
can be used for non-static mapping.
Use LanguageFileType for files having Language support.StdFileTypes,
FileTypes,
INativeFileType| Modifier and Type | Field and Description |
|---|---|
static FileType[] |
EMPTY_ARRAY |
EDITABLE_COPY_PREFIX| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCharset(VirtualFile file,
byte [] content)
Returns the character set for the specified file.
|
java.lang.String |
getDefaultExtension()
Returns the default extension for files of the type.
|
java.lang.String |
getDescription()
Returns the user-readable description of the file type.
|
javax.swing.Icon |
getIcon()
Returns the icon used for showing files of the type.
|
java.lang.String |
getName()
Returns the name of the file type.
|
boolean |
isBinary()
Returns
true if files of the specified type contain binary data. |
boolean |
isReadOnly()
Returns
true if the specified file type is read-only. |
getDisplayNamestatic final FileType[] EMPTY_ARRAY
java.lang.String getName()
java.lang.String getDescription()
java.lang.String getDefaultExtension()
javax.swing.Icon getIcon()
null if no icon should be shown.boolean isBinary()
true if files of the specified type contain binary data. Used for source control, to-do items scanning and other purposes.true if the file is binary, false if the file is plain text.boolean isReadOnly()
true if the specified file type is read-only. Read-only file types are not shown in the "File Types" settings dialog,
and users cannot change the extensions associated with the file type.true if the file type is read-only, false otherwise.java.lang.String getCharset(VirtualFile file, byte [] content)
file - The file for which the character set is requested.content - File content.Charset class.