Class TdApi.GetFileMimeType

Enclosing class:
TdApi

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

Returns Text

  • Field Details

    • 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:
  • Constructor Details

    • 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.
  • Method Details