DocumentsContractCompat

Helper for accessing features in DocumentsContract.

Types

Link copied to clipboard
Helper for accessing features in DocumentsContract.Document.

Functions

Link copied to clipboard
@Nullable
open fun buildChildDocumentsUri(@NonNull authority: @NonNull String, @Nullable parentDocumentId: @Nullable String): @Nullable Uri
Build URI representing the children of the target directory in a document provider.
Link copied to clipboard
@Nullable
open fun buildChildDocumentsUriUsingTree(@NonNull treeUri: @NonNull Uri, @NonNull parentDocumentId: @NonNull String): @Nullable Uri
Build URI representing the children of the target directory in a document provider.
Link copied to clipboard
@Nullable
open fun buildDocumentUri(@NonNull authority: @NonNull String, @NonNull documentId: @NonNull String): @Nullable Uri
Build URI representing the target COLUMN_DOCUMENT_ID in a document provider.
Link copied to clipboard
@Nullable
open fun buildDocumentUriUsingTree(@NonNull treeUri: @NonNull Uri, @NonNull documentId: @NonNull String): @Nullable Uri
Build URI representing the target COLUMN_DOCUMENT_ID in a document provider.
Link copied to clipboard
@Nullable
open fun buildTreeDocumentUri(@NonNull authority: @NonNull String, @NonNull documentId: @NonNull String): @Nullable Uri
Build URI representing access to descendant documents of the given COLUMN_DOCUMENT_ID.
Link copied to clipboard
@Nullable
open fun createDocument(@NonNull content: @NonNull ContentResolver, @NonNull parentDocumentUri: @NonNull Uri, @NonNull mimeType: @NonNull String, @NonNull displayName: @NonNull String): @Nullable Uri
Create a new document with given MIME type and display name.
Link copied to clipboard
@Nullable
open fun getDocumentId(@NonNull documentUri: @NonNull Uri): @Nullable String
Extract the COLUMN_DOCUMENT_ID from the given URI.
Link copied to clipboard
@Nullable
open fun getTreeDocumentId(@NonNull documentUri: @NonNull Uri): @Nullable String
Extract the via COLUMN_DOCUMENT_ID from the given URI.
Link copied to clipboard
open fun isDocumentUri(@NonNull context: @NonNull Context, @Nullable uri: @Nullable Uri): Boolean
Checks if the given URI represents a Document backed by a DocumentsProvider.
Link copied to clipboard
open fun isTreeUri(@NonNull uri: @NonNull Uri): Boolean
Checks if the given URI represents a Document tree.
Link copied to clipboard
open fun removeDocument(@NonNull content: @NonNull ContentResolver, @NonNull documentUri: @NonNull Uri, @NonNull parentDocumentUri: @NonNull Uri): Boolean
Removes the given document from a parent directory.
Link copied to clipboard
@Nullable
open fun renameDocument(@NonNull content: @NonNull ContentResolver, @NonNull documentUri: @NonNull Uri, @NonNull displayName: @NonNull String): @Nullable Uri
Change the display name of an existing document.