Class of android.provider · DocumentsProvider.java · Android's reference
public abstract class DocumentsProvider extends ContentProvider
DocumentsProvider ← ContentProvider
A provider of documents (the Storage Access Framework's): the app gives its roots, documents and their children, and this class answers the content URIs of DocumentsContract with them (content://authority/root, /document/ID, /document/ID/children, and the same under /tree/ID). The document calls that change something (create, delete, rename, copy, move, remove) are unsupported until the app implements them.
public DocumentsProvider() empty body sourcepublic abstract Cursor queryRoots(String[] projection) throws FileNotFoundException sourcepublic abstract Cursor queryDocument(String documentId, String[] projection) throws FileNotFoundException sourcepublic abstract Cursor queryChildDocuments(String parentDocumentId, String[] projection, String sortOrder) throws FileNotFoundException sourcepublic Cursor queryChildDocuments(String parentDocumentId, String[] projection, Bundle queryArgs) throws FileNotFoundException sourcepublic abstract ParcelFileDescriptor openDocument(String documentId, String mode, CancellationSignal signal) throws FileNotFoundException sourcepublic Cursor queryRecentDocuments(String rootId, String[] projection) throws FileNotFoundException throws UnsupportedOperationException sourcepublic Cursor querySearchDocuments(String rootId, String query, String[] projection) throws FileNotFoundException throws UnsupportedOperationException sourcepublic boolean isChildDocument(String parentDocumentId, String documentId) sourcepublic String createDocument(String parentDocumentId, String mimeType, String displayName) throws FileNotFoundException throws UnsupportedOperationException sourcepublic String renameDocument(String documentId, String displayName) throws FileNotFoundException throws UnsupportedOperationException sourcepublic void deleteDocument(String documentId) throws FileNotFoundException throws UnsupportedOperationException sourcepublic String copyDocument(String sourceDocumentId, String targetParentDocumentId) throws FileNotFoundException throws UnsupportedOperationException sourcepublic String moveDocument(String sourceDocumentId, String sourceParentDocumentId, String targetParentDocumentId) throws FileNotFoundException throws UnsupportedOperationException sourcepublic void removeDocument(String documentId, String parentDocumentId) throws FileNotFoundException throws UnsupportedOperationException sourcepublic AssetFileDescriptor openDocumentThumbnail(String documentId, Point sizeHint, CancellationSignal signal) throws FileNotFoundException throws UnsupportedOperationException sourcepublic String getDocumentType(String documentId) throws FileNotFoundException sourcea document's MIME type: its COLUMN_MIME_TYPE in queryDocument
public final Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) sourcepublic final String getType(Uri uri) sourcepublic Bundle call(String method, String arg, Bundle extras) sourcethe document calls of DocumentsContract (create, rename, delete, remove, copy, move), as Android's provider answers them
public final Uri insert(Uri uri, ContentValues values) throws UnsupportedOperationException sourcepublic final int delete(Uri uri, String selection, String[] selectionArgs) throws UnsupportedOperationException sourcepublic final int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) throws UnsupportedOperationException sourcepublic final ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException sourcepublic final ParcelFileDescriptor openFile(Uri uri, String mode, CancellationSignal signal) throws FileNotFoundException sourceMade from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.