次の方法で共有


DocumentsProvider.RenameDocument(String, String) Method

Definition

Rename an existing document.

[Android.Runtime.Register("renameDocument", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "GetRenameDocument_Ljava_lang_String_Ljava_lang_String_Handler")]
public virtual string? RenameDocument (string? documentId, string? displayName);
[<Android.Runtime.Register("renameDocument", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "GetRenameDocument_Ljava_lang_String_Ljava_lang_String_Handler")>]
abstract member RenameDocument : string * string -> string
override this.RenameDocument : string * string -> string

Parameters

documentId
String

the document to rename.

displayName
String

the updated display name of the document. The provider may alter this name to meet any internal constraints, such as avoiding conflicting names.

Returns

Attributes

Exceptions

Remarks

Rename an existing document.

If a different Document#COLUMN_DOCUMENT_ID must be used to represent the renamed document, generate and return it. Any outstanding URI permission grants will be updated to point at the new document. If the original Document#COLUMN_DOCUMENT_ID is still valid after the rename, return null.

Java documentation for android.provider.DocumentsProvider.renameDocument(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