Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Document

*** ** * ** ***

```
class Document
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.provider.DocumentsContract.Document](https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#) |

Constants related to a document, including `https://developer.android.com/reference/kotlin/android/database/Cursor.html#` column names and flags.

A document can be either an openable stream (with a specific MIME type), or a directory containing additional documents (with the `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#MIME_TYPE_DIR:kotlin.String` MIME type). A directory represents the top of a subtree containing zero or more documents, which can recursively contain even more documents and directories.

All columns are *read-only* to client applications.

## Summary

| Constants ||
|---|---|
| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_CONTENT_SYNC_STATE_FLAGS:kotlin.String` Column indicating the synchronization state of the document's contents represented as a bitmask, `null` if not provided. |
| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_DISPLAY_NAME:kotlin.String` Display name of a document, used as the primary title displayed to a user. |
| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_DOCUMENT_ID:kotlin.String` Unique ID of a document. |
| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String` Flags that apply to a document. |
| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_ICON:kotlin.String` Specific icon resource ID for a document. |
| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_LAST_MODIFIED:kotlin.String` Timestamp when a document was last modified, in milliseconds since January 1, 1970 00:00:00. |
| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE:kotlin.String` Concrete MIME type of a document. |
| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_ORIGINAL_RELATIVE_PATH:kotlin.String` The relative path of the original location of a trashed document. |
| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_SIZE:kotlin.String` Size of a document, in bytes, or `null` if unknown. |
| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_SUMMARY:kotlin.String` Summary of a document, which may be shown to a user. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_DIR_BLOCKS_OPEN_DOCUMENT_TREE:kotlin.Int` Flag indicating that a document is a directory that wants to block itself from being selected when the user launches an `https://developer.android.com/reference/kotlin/android/content/Intent.html#ACTION_OPEN_DOCUMENT_TREE:kotlin.String` intent. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_DIR_PREFERS_GRID:kotlin.Int` Flag indicating that a directory prefers its contents be shown in a larger format grid. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_DIR_PREFERS_LAST_MODIFIED:kotlin.Int` Flag indicating that a directory prefers its contents be sorted by `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_LAST_MODIFIED:kotlin.String`. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_DIR_SUPPORTS_CREATE:kotlin.Int` Flag indicating that a document is a directory that supports creation of new files within it. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_PARTIAL:kotlin.Int` Flag indicating that a document is not complete, likely its contents are being downloaded. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_COPY:kotlin.Int` Flag indicating that a document can be copied to another location within the same document provider. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_DELETE:kotlin.Int` Flag indicating that a document is deletable. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_METADATA:kotlin.Int` Flag indicating that a document has available metadata that can be read using DocumentsContract#getDocumentMetadata |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_MOVE:kotlin.Int` Flag indicating that a document can be moved to another location within the same document provider. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_REMOVE:kotlin.Int` Flag indicating that a document can be removed from a parent. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_RENAME:kotlin.Int` Flag indicating that a document can be renamed. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_RESTORE:kotlin.Int` Flag indicating that a document can be restored. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_SETTINGS:kotlin.Int` Flag indicating that a document has settings that can be configured by user. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_SUBTREE_SEARCH:kotlin.Int` Flag indicating this document supports subtree searching. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_THUMBNAIL:kotlin.Int` Flag indicating that a document can be represented as a thumbnail. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_TRASH:kotlin.Int` Flag indicating that a document can be trashed. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_WRITE:kotlin.Int` Flag indicating that a document supports writing. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_VIRTUAL_DOCUMENT:kotlin.Int` Flag indicating that a document is virtual, and doesn't have byte representation in the MIME type specified as `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE:kotlin.String`. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_WEB_LINKABLE:kotlin.Int` Flag indicating that a Web link can be obtained for the document. |
| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#MIME_TYPE_DIR:kotlin.String` MIME type of a document which is a directory that may contain additional documents. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_AVAILABLE_LOCALLY:kotlin.Int` Flag indicating that the document's contents are available locally. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_DOWNLOAD_ERROR:kotlin.Int` Flag indicating that the last download attempt resulted in an error. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_DOWNLOAD_PROGRESS:kotlin.Int` Flag indicating that a download of remote changes is currently in progress. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_LOCAL_CHANGES:kotlin.Int` Flag indicating that the local version of the document has changes that require an upload. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_UPLOAD_ERROR:kotlin.Int` Flag indicating that the last upload attempt resulted in an error. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_UPLOAD_PROGRESS:kotlin.Int` Flag indicating that an upload of local changes is currently in progress. |

## Constants

### COLUMN_CONTENT_SYNC_STATE_FLAGS

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val COLUMN_CONTENT_SYNC_STATE_FLAGS: String
```

Column indicating the synchronization state of the document's contents represented as a bitmask, `null` if not provided. This is an optional column. Type: Integer (int)

    Value: "content_sync_state_flags"

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_AVAILABLE_LOCALLY:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_LOCAL_CHANGES:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_UPLOAD_PROGRESS:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_DOWNLOAD_PROGRESS:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_UPLOAD_ERROR:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_DOWNLOAD_ERROR:kotlin.Int`

### COLUMN_DISPLAY_NAME

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val COLUMN_DISPLAY_NAME: String
```

Display name of a document, used as the primary title displayed to a user. This column is required.

Type: STRING

    Value: "_display_name"

### COLUMN_DOCUMENT_ID

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val COLUMN_DOCUMENT_ID: String
```

Unique ID of a document. This ID is both provided by and interpreted by a `https://developer.android.com/reference/kotlin/android/provider/DocumentsProvider`, and should be treated as an opaque value by client applications. This column is required.

Each document must have a unique ID within a provider, but that single document may be included as a child of multiple directories.

A provider must always return durable IDs, since they will be used to issue long-term URI permission grants when an application interacts with `https://developer.android.com/reference/kotlin/android/content/Intent.html#ACTION_OPEN_DOCUMENT:kotlin.String` and `https://developer.android.com/reference/kotlin/android/content/Intent.html#ACTION_CREATE_DOCUMENT:kotlin.String`.

Type: STRING

    Value: "document_id"

### COLUMN_FLAGS

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val COLUMN_FLAGS: String
```

Flags that apply to a document. This column is required.

Type: INTEGER (int)

    Value: "flags"

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_DIR_BLOCKS_OPEN_DOCUMENT_TREE:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_DIR_PREFERS_GRID:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_DIR_PREFERS_LAST_MODIFIED:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_DIR_SUPPORTS_CREATE:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_PARTIAL:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_COPY:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_DELETE:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_METADATA:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_MOVE:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_REMOVE:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_RENAME:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_SETTINGS:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_THUMBNAIL:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_WRITE:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_VIRTUAL_DOCUMENT:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#FLAG_WEB_LINKABLE:kotlin.Int`

### COLUMN_ICON

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val COLUMN_ICON: String
```

Specific icon resource ID for a document. This column is optional, and may be `null` to use a platform-provided default icon based on `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE:kotlin.String`.

Type: INTEGER (int)

    Value: "icon"

### COLUMN_LAST_MODIFIED

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val COLUMN_LAST_MODIFIED: String
```

Timestamp when a document was last modified, in milliseconds since January 1, 1970 00:00:00.0 UTC. This column is required, and may be `null` if unknown. A `https://developer.android.com/reference/kotlin/android/provider/DocumentsProvider` can update this field using events from `https://developer.android.com/reference/kotlin/android/os/ParcelFileDescriptor.OnCloseListener.html#` or other reliable `https://developer.android.com/reference/kotlin/android/os/ParcelFileDescriptor.html#` transports.

Type: INTEGER (long)

    Value: "last_modified"

**See Also**

- `https://developer.android.com/reference/kotlin/java/lang/System.html#currentTimeMillis()`

### COLUMN_MIME_TYPE

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val COLUMN_MIME_TYPE: String
```

Concrete MIME type of a document. For example, "image/png" or "application/pdf" for openable files. A document can also be a directory containing additional documents, which is represented with the `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#MIME_TYPE_DIR:kotlin.String` MIME type. This column is required.

Type: STRING

    Value: "mime_type"

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#MIME_TYPE_DIR:kotlin.String`

### COLUMN_ORIGINAL_RELATIVE_PATH

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val COLUMN_ORIGINAL_RELATIVE_PATH: String
```

The relative path of the original location of a trashed document. This column is only valid for trashed documents.

Type: STRING

    Value: "original_relative_path"

### COLUMN_SIZE

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val COLUMN_SIZE: String
```

Size of a document, in bytes, or `null` if unknown. This column is required.

Type: INTEGER (long)

    Value: "_size"

### COLUMN_SUMMARY

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val COLUMN_SUMMARY: String
```

Summary of a document, which may be shown to a user. This column is optional, and may be `null`.

Type: STRING

    Value: "summary"

### FLAG_DIR_BLOCKS_OPEN_DOCUMENT_TREE

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val FLAG_DIR_BLOCKS_OPEN_DOCUMENT_TREE: Int
```

Flag indicating that a document is a directory that wants to block itself from being selected when the user launches an `https://developer.android.com/reference/kotlin/android/content/Intent.html#ACTION_OPEN_DOCUMENT_TREE:kotlin.String` intent. Individual files can still be selected when launched via other intents like `https://developer.android.com/reference/kotlin/android/content/Intent.html#ACTION_OPEN_DOCUMENT:kotlin.String` and `https://developer.android.com/reference/kotlin/android/content/Intent.html#ACTION_GET_CONTENT:kotlin.String`. Only valid when `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE:kotlin.String` is `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#MIME_TYPE_DIR:kotlin.String`.

Note that this flag *only* applies to the single directory to which it is applied. It does *not* block the user from selecting either a parent or child directory during an `https://developer.android.com/reference/kotlin/android/content/Intent.html#ACTION_OPEN_DOCUMENT_TREE:kotlin.String` request. In particular, the only way to guarantee that a specific directory can never be granted via an `https://developer.android.com/reference/kotlin/android/content/Intent.html#ACTION_OPEN_DOCUMENT_TREE:kotlin.String` request is to ensure that both it and *all of its parent directories* have set this flag.

    Value: 32768

**See Also**

- `https://developer.android.com/reference/kotlin/android/content/Intent.html#ACTION_OPEN_DOCUMENT_TREE:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String`

### FLAG_DIR_PREFERS_GRID

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val FLAG_DIR_PREFERS_GRID: Int
```

Flag indicating that a directory prefers its contents be shown in a larger format grid. Usually suitable when a directory contains mostly pictures. Only valid when `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE:kotlin.String` is `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#MIME_TYPE_DIR:kotlin.String`.

    Value: 16

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String`

### FLAG_DIR_PREFERS_LAST_MODIFIED

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val FLAG_DIR_PREFERS_LAST_MODIFIED: Int
```

Flag indicating that a directory prefers its contents be sorted by `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_LAST_MODIFIED:kotlin.String`. Only valid when `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE:kotlin.String` is `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#MIME_TYPE_DIR:kotlin.String`.

    Value: 32

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String`

### FLAG_DIR_SUPPORTS_CREATE

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val FLAG_DIR_SUPPORTS_CREATE: Int
```

Flag indicating that a document is a directory that supports creation of new files within it. Only valid when `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE:kotlin.String` is `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#MIME_TYPE_DIR:kotlin.String`.

    Value: 8

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsProvider#createDocument(kotlin.String,%20kotlin.String,%20kotlin.String)`

### FLAG_PARTIAL

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val FLAG_PARTIAL: Int
```

Flag indicating that a document is not complete, likely its contents are being downloaded. Partial files cannot be opened, copied, moved in the UI. But they can be deleted and retried if they represent a failed download.

    Value: 8192

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String`

### FLAG_SUPPORTS_COPY

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val FLAG_SUPPORTS_COPY: Int
```

Flag indicating that a document can be copied to another location within the same document provider.

    Value: 128

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract#copyDocument(android.content.ContentResolver,%20android.net.Uri,%20android.net.Uri)`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsProvider#copyDocument(kotlin.String,%20kotlin.String)`

### FLAG_SUPPORTS_DELETE

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val FLAG_SUPPORTS_DELETE: Int
```

Flag indicating that a document is deletable.

    Value: 4

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract#deleteDocument(android.content.ContentResolver,%20android.net.Uri)`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsProvider#deleteDocument(kotlin.String)`

### FLAG_SUPPORTS_METADATA

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val FLAG_SUPPORTS_METADATA: Int
```

Flag indicating that a document has available metadata that can be read using DocumentsContract#getDocumentMetadata

    Value: 16384

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract#getDocumentMetadata(android.content.ContentResolver,%20android.net.Uri)`

### FLAG_SUPPORTS_MOVE

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val FLAG_SUPPORTS_MOVE: Int
```

Flag indicating that a document can be moved to another location within the same document provider.

    Value: 256

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract#moveDocument(android.content.ContentResolver,%20android.net.Uri,%20android.net.Uri,%20android.net.Uri)`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsProvider#moveDocument(kotlin.String,%20kotlin.String,%20kotlin.String)`

### FLAG_SUPPORTS_REMOVE

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val FLAG_SUPPORTS_REMOVE: Int
```

Flag indicating that a document can be removed from a parent.

    Value: 1024

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract#removeDocument(android.content.ContentResolver,%20android.net.Uri,%20android.net.Uri)`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsProvider#removeDocument(kotlin.String,%20kotlin.String)`

### FLAG_SUPPORTS_RENAME

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val FLAG_SUPPORTS_RENAME: Int
```

Flag indicating that a document can be renamed.

    Value: 64

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract#renameDocument(android.content.ContentResolver,%20android.net.Uri,%20kotlin.String)`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsProvider#renameDocument(kotlin.String,%20kotlin.String)`

### FLAG_SUPPORTS_RESTORE

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val FLAG_SUPPORTS_RESTORE: Int
```

Flag indicating that a document can be restored. Only trashed documents can be restored

    Value: 131072

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract#restoreDocumentFromTrash(android.content.ContentResolver,%20android.net.Uri,%20android.net.Uri)`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsProvider#restoreDocumentFromTrash(kotlin.String,%20kotlin.String)`

### FLAG_SUPPORTS_SETTINGS

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val FLAG_SUPPORTS_SETTINGS: Int
```

Flag indicating that a document has settings that can be configured by user.

    Value: 2048

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract#ACTION_DOCUMENT_SETTINGS:kotlin.String`

### FLAG_SUPPORTS_SUBTREE_SEARCH

Added in [API level 37.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val FLAG_SUPPORTS_SUBTREE_SEARCH: Int
```

Flag indicating this document supports subtree searching.

When set, this directory acts as a valid starting point for searches restricted to its descendants. This flag is only valid when `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE:kotlin.String` is `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#MIME_TYPE_DIR:kotlin.String`.

When set, the system will call `https://developer.android.com/reference/kotlin/android/provider/DocumentsProvider#querySearchDocuments(kotlin.String,%20kotlin.Array,%20android.os.Bundle,%20android.os.CancellationSignal)` when a user initiates a search within this document.

    Value: 262144

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract#buildSearchDocumentsUri(android.net.Uri,%20kotlin.String)`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsProvider#querySearchDocuments(kotlin.String,%20kotlin.Array,%20android.os.Bundle,%20android.os.CancellationSignal)`

### FLAG_SUPPORTS_THUMBNAIL

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val FLAG_SUPPORTS_THUMBNAIL: Int
```

Flag indicating that a document can be represented as a thumbnail.

    Value: 1

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract#getDocumentThumbnail(android.content.ContentResolver,%20android.net.Uri,%20android.graphics.Point,%20android.os.CancellationSignal)`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsProvider#openDocumentThumbnail(kotlin.String,%20android.graphics.Point,%20android.os.CancellationSignal)`

### FLAG_SUPPORTS_TRASH

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val FLAG_SUPPORTS_TRASH: Int
```

Flag indicating that a document can be trashed.

    Value: 65536

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract#trashDocument(android.content.ContentResolver,%20android.net.Uri)`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsProvider#trashDocument(kotlin.String)`

### FLAG_SUPPORTS_WRITE

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val FLAG_SUPPORTS_WRITE: Int
```

Flag indicating that a document supports writing.

When a document is opened with `https://developer.android.com/reference/kotlin/android/content/Intent.html#ACTION_OPEN_DOCUMENT:kotlin.String`, the calling application is granted both `https://developer.android.com/reference/kotlin/android/content/Intent.html#FLAG_GRANT_READ_URI_PERMISSION:kotlin.Int` and `https://developer.android.com/reference/kotlin/android/content/Intent.html#FLAG_GRANT_WRITE_URI_PERMISSION:kotlin.Int`. However, the actual writability of a document may change over time, for example due to remote access changes. This flag indicates that a document client can expect `https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openOutputStream(android.net.Uri)` to succeed.

    Value: 2

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String`

### FLAG_VIRTUAL_DOCUMENT

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val FLAG_VIRTUAL_DOCUMENT: Int
```

Flag indicating that a document is virtual, and doesn't have byte representation in the MIME type specified as `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE:kotlin.String`.

*Virtual documents must have at least one alternative streamable format via `https://developer.android.com/reference/kotlin/android/provider/DocumentsProvider#openTypedDocument(kotlin.String,%20kotlin.String,%20android.os.Bundle,%20android.os.CancellationSignal)`*

    Value: 512

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsProvider#openTypedDocument(kotlin.String,%20kotlin.String,%20android.os.Bundle,%20android.os.CancellationSignal)`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsProvider#getDocumentStreamTypes(kotlin.String,%20kotlin.String)`

### FLAG_WEB_LINKABLE

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val FLAG_WEB_LINKABLE: Int
```

Flag indicating that a Web link can be obtained for the document.

    Value: 4096

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_FLAGS:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/provider/DocumentsProvider#createWebLinkIntent(kotlin.String,%20android.os.Bundle)`

### MIME_TYPE_DIR

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val MIME_TYPE_DIR: String
```

MIME type of a document which is a directory that may contain additional documents.

    Value: "vnd.android.document/directory"

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE:kotlin.String`

### SYNC_STATE_FLAG_AVAILABLE_LOCALLY

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val SYNC_STATE_FLAG_AVAILABLE_LOCALLY: Int
```

Flag indicating that the document's contents are available locally. When the device does not have internet connection, certain document operations may be disabled, see `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Root#FLAG_LIMITED_FUNCTIONALITY_WHEN_OFFLINE:kotlin.Int` for more details.

    Value: 1

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Root#FLAG_LIMITED_FUNCTIONALITY_WHEN_OFFLINE:kotlin.Int`

### SYNC_STATE_FLAG_DOWNLOAD_ERROR

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val SYNC_STATE_FLAG_DOWNLOAD_ERROR: Int
```

Flag indicating that the last download attempt resulted in an error.

    Value: 32

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_CONTENT_SYNC_STATE_FLAGS:kotlin.String`

### SYNC_STATE_FLAG_DOWNLOAD_PROGRESS

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val SYNC_STATE_FLAG_DOWNLOAD_PROGRESS: Int
```

Flag indicating that a download of remote changes is currently in progress.

    Value: 8

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_CONTENT_SYNC_STATE_FLAGS:kotlin.String`

### SYNC_STATE_FLAG_LOCAL_CHANGES

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val SYNC_STATE_FLAG_LOCAL_CHANGES: Int
```

Flag indicating that the local version of the document has changes that require an upload. This flag is only meaningful if `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_AVAILABLE_LOCALLY:kotlin.Int` is also set.

    Value: 2

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_CONTENT_SYNC_STATE_FLAGS:kotlin.String`

### SYNC_STATE_FLAG_UPLOAD_ERROR

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val SYNC_STATE_FLAG_UPLOAD_ERROR: Int
```

Flag indicating that the last upload attempt resulted in an error. This flag typically implies `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_AVAILABLE_LOCALLY:kotlin.Int` and `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_LOCAL_CHANGES:kotlin.Int` are also set.

    Value: 16

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_CONTENT_SYNC_STATE_FLAGS:kotlin.String`

### SYNC_STATE_FLAG_UPLOAD_PROGRESS

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val SYNC_STATE_FLAG_UPLOAD_PROGRESS: Int
```

Flag indicating that an upload of local changes is currently in progress. This flag typically implies `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_AVAILABLE_LOCALLY:kotlin.Int` and `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_LOCAL_CHANGES:kotlin.Int` are also set.

    Value: 4

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/DocumentsContract.Document#COLUMN_CONTENT_SYNC_STATE_FLAGS:kotlin.String`