URLUtil.GuessFileName(String, String, String) Method

Definition

Guesses canonical filename that a download would have, using the URL and contentDisposition.

[Android.Runtime.Register("guessFileName", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "")]
public static string? GuessFileName (string? url, string? contentDisposition, string? mimeType);
[<Android.Runtime.Register("guessFileName", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "")>]
static member GuessFileName : string * string * string -> string

Parameters

url
String

Url to the content

contentDisposition
String

Content-Disposition HTTP header or null

mimeType
String

Mime-type of the content or null

Returns

suggested filename

Attributes

Remarks

Guesses canonical filename that a download would have, using the URL and contentDisposition. File extension, if not defined, is added based on the mimetype

Java documentation for android.webkit.URLUtil.guessFileName(java.lang.String, java.lang.String, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to