Method DocsView.setEnableDrives
Stay organized with collections
Save and categorize content based on your preferences.
Shows shared drives and the files they contain. Before enabling, refer to
GoogleDrive API documentation for enabling shared drives.
If true
, only shared drives are included in the view.
Don't combine this setting with setParent
or setFileIds
. Calls to this
function override previous calls to setParent
or setFileIds
.
Don't combine this setting with setOwnedByMe
. When setEnableDrives(true)
and setOwnedByMe(true)
are set, there are no results.
Don't combine this setting with setStarred
. When setEnableDrives(true)
is
set, setStarred
is ignored.
Signature
setEnableDrives(enabled: boolean): DocsView;
Details
Optional |
No |
Final |
No |
Protected |
No |
Static |
No |
Parameters
Name |
Type |
Optional |
Description |
enabled |
boolean |
No |
|
Returns
DocsView
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-20 UTC.
[null,null,["Last updated 2025-06-20 UTC."],[],[],null,["# Method DocsView.setEnableDrives\n\nShows shared drives and the files they contain. Before enabling, refer to\n[GoogleDrive API documentation for enabling shared drives](/workspace/drive/v3/web/enable-shareddrives).\n\nIf `true`, only shared drives are included in the view.\n\nDon't combine this setting with `setParent` or `setFileIds`. Calls to this\nfunction override previous calls to `setParent` or `setFileIds`.\n\nDon't combine this setting with `setOwnedByMe`. When `setEnableDrives(true)`\nand `setOwnedByMe(true)` are set, there are no results.\n\nDon't combine this setting with `setStarred`. When `setEnableDrives(true)` is\nset, `setStarred` is ignored.\n\nSignature\n---------\n\n setEnableDrives(enabled: boolean): DocsView;\n\nDetails\n-------\n\n| Optional | No |\n| Final | No |\n| Protected | No |\n| Static | No |\n|-----------|----|\n\nParameters\n----------\n\n| Name | Type | Optional | Description |\n|-----------|-----------|----------|-------------|\n| `enabled` | `boolean` | No | |\n\nReturns\n-------\n\n[DocsView](./picker.docsview)"]]