GetFileExtension

public struct GetFileExtension : Codable, Equatable, TDFunction

Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. This is an offline method. Can be called before authorization. Can be called synchronously

  • Undocumented

    Declaration

    Swift

    public typealias Result = Text
  • The MIME type of the file

    Declaration

    Swift

    public let mimeType: String
  • Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. This is an offline method. Can be called before authorization. Can be called synchronously

    Declaration

    Swift

    public init(mimeType: String)

    Parameters

    mimeType

    The MIME type of the file