Class TdApi.GetFileMimeType

  • Enclosing class:
    TdApi

    public static class TdApi.GetFileMimeType
    extends TdApi.Function
    Returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously.

    Returns Text

    • Field Detail

      • fileName

        public String fileName
        The name of the file or path to the file.
      • CONSTRUCTOR

        public static final int CONSTRUCTOR
        Identifier uniquely determining type of the object.
        See Also:
        Constant Field Values
    • Constructor Detail

      • GetFileMimeType

        public GetFileMimeType()
        Default constructor for a function, which returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously.

        Returns Text

      • GetFileMimeType

        public GetFileMimeType​(String fileName)
        Creates a function, which returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously.

        Returns Text

        Parameters:
        fileName - The name of the file or path to the file.