DocumentsContract.RenameDocument(ContentResolver, Uri, String) Method

Definition

Change the display name of an existing document.

[Android.Runtime.Register("renameDocument", "(Landroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;)Landroid/net/Uri;", "")]
public static Android.Net.Uri? RenameDocument (Android.Content.ContentResolver content, Android.Net.Uri documentUri, string displayName);
[<Android.Runtime.Register("renameDocument", "(Landroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;)Landroid/net/Uri;", "")>]
static member RenameDocument : Android.Content.ContentResolver * Android.Net.Uri * string -> Android.Net.Uri

Parameters

content
ContentResolver
documentUri
Uri

document with Document#FLAG_SUPPORTS_RENAME

displayName
String

updated name for document

Returns

Uri

the existing or new document after the rename, or null if failed.

Attributes

Remarks

Change the display name of an existing document.

If the underlying provider needs to create a new Document#COLUMN_DOCUMENT_ID to represent the updated display name, that new document is returned and the original document is no longer valid. Otherwise, the original document is returned.

Java documentation for android.provider.DocumentsContract.renameDocument(android.content.ContentResolver, android.net.Uri, 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