Options
All
  • Public
  • Public/Protected
  • All
Menu

Module IEditorMimeTypeService

A namespace for IEditorMimeTypeService.

Index

Variables

Const defaultMimeType

defaultMimeType: string = "text/plain"

The default mime type.

Methods

getMimeTypeByFilePath

  • getMimeTypeByFilePath(filePath: string): string
  • Get a mime type for the given file path.

    Parameters

    • filePath: string

      The full path to the file.

    Returns string

    A valid mimetype.

    Notes

    If a mime type cannot be found returns the defaul mime type text/plain, never null.

getMimeTypeByLanguage

  • getMimeTypeByLanguage(info: ILanguageInfoMetadata): string
  • Get a mime type for the given language info.

    Parameters

    • info: ILanguageInfoMetadata

      The language information.

    Returns string

    A valid mimetype.

    Notes

    If a mime type cannot be found returns the defaul mime type text/plain, never null.

Generated using TypeDoc