Share via


DocumentsProvider.RemoveDocument(String, String) Method

Definition

Removes the requested document or a document tree.

[Android.Runtime.Register("removeDocument", "(Ljava/lang/String;Ljava/lang/String;)V", "GetRemoveDocument_Ljava_lang_String_Ljava_lang_String_Handler", ApiSince=24)]
public virtual void RemoveDocument (string? documentId, string? parentDocumentId);
[<Android.Runtime.Register("removeDocument", "(Ljava/lang/String;Ljava/lang/String;)V", "GetRemoveDocument_Ljava_lang_String_Ljava_lang_String_Handler", ApiSince=24)>]
abstract member RemoveDocument : string * string -> unit
override this.RemoveDocument : string * string -> unit

Parameters

documentId
String

the document to remove.

parentDocumentId
String

the parent of the document to move.

Attributes

Remarks

Removes the requested document or a document tree.

In contrast to #deleteDocument it requires specifying the parent. This method is especially useful if the document can be in multiple parents.

It's the responsibility of the provider to revoke grants if the document is removed from the last parent, and effectively the document is deleted.

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