DocumentsContractCompat

Helper for accessing features in DocumentsContract.

Types

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

Functions

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