Google Drive organizes files in collections, describes files by types, and provides specific attributes for each file to facilitate file manipulation.
The Drive API represents files stored on Google Drive as a
Drive organizes files based on the user's relationship with the content as well as its storage location. Collections are specified as part of the file's metadata to show which group of files the file is stored with inside Google Drive. The main difference between My Drive and shared drive collections are the file ownership. A single user is the owner of files in their My Drive, whereas a group or organization owns files in a shared drive.
- My Drive
- Each user has a "root" folder called "My Drive" that functions as their primary hierarchy, and consists of everything that descends from this root folder. The user is the primary owner of this folder.
- Shared drives
- A shared drive is an organizational structure within Google Drive that lives parallel to My Drive. You can organize an individual file within a shared drive or in My Drive but not both.
Google Drive describes files by types. This list shows all available file types:
- A file that contains text or binary content such as images, videos, and PDFs.
A container you can use to organize other types of files on Drive. Folders are files that only contain metadata, and have the MIME type
Note: A single file stored on My Drive can be contained in multiple folders. A single file stored on a shared drive can only have one parent folder.
A file that links to content stored on a third-party storage system, and only contains metadata. The shortcut file MIME type is
- G Suite document
A file that a G Suite application creates, such as Google Docs, Sheets, and Slides. The MIME type format is
application/vnd.google-apps.*app*where app is the application name (e.g.
application/vnd.google-apps.spreadsheetfor a Google Sheets file). To look at other Google Drive MIME types, see MIME types.
Note: You cannot upload or download folders, shortcuts, and G Suite documents to or from Google Drive.
However, you can upload or export G Suite documents if they use compatible formats. For example, you can create a Google Doc when you import a PDF. Similarly, you can export a Google Slides presentation as a
This list shows some characteristics of a Drive file:
- File ID
- A unique opaque ID for each file. File IDs are stable throughout the life of the file, even if the file name changes. Search expressions are used to locate files by name, type, content, parent container, owner, or other metadata.
- Data that describes the content of the file. This data includes the
name, type, creation and modification times. Some metadata
fields, such as the
nameare user-agnostic and appear the same for each user. Other fields, such as
viewedByMeDatecontain user-specific values. File types, such as images and videos, contain additional metadata extracted from EXIF and other embedded metadata.
- An access grant for a user, group, domain or the world to access a file or a folder hierarchy. Users control who can access a file with the access control list (ACL), which is a list of permissions for the file. For more information, see Share files, folders, and drives.
- The binary or text body of the file. Some content examples you can store in Google Drive are images, videos, text, and PDF.
- Revision history
- The record of changes to the file content only, not the file metadata. For more details about revisions, see Changes and revisions overview.
- A graphical representation of a file. Drive automatically generates thumbnails for many common file types. For shortcuts and other file types that Drive can't render, you can provide a thumbnail image.
The Drive API organizes files into storage locations, called spaces, and collections, called corpora.
Specific storage locations that are isolated from each other. All content in Google Drive is stored in one of these three defined spaces:
Drive space - The
drivespace includes all user-visible files created or stored in Google Drive. PDFs, Google Docs, Sheets, and slides, and any other content the user uploads, is located in the
App data folder space - The
appDataFolderspace is a separate storage area for per-user application data. Applications typically store configuration files and other data not intended to be directly accessed by users.
Photos space - The
photosspace includes all user-visible image files created or stored in Google Drive.
Files cannot move between spaces.
Collections of files used to narrow the scope of file and folder searches. The corpora for Drive are:
User corpora - The
usercorpora includes all files in "My Drive" and "Shared with me."
Domain corpora - The
domaincorpora includes all files shared to the user's domain that are searchable.
Drive corpora - The
drivecorpora includes all files contained in a single shared drive.
All drives corpora - The
allDrivescorpora includes all files in shared drives that the user is a member of and all files in "My Drive" and "Shared with me." Use the
allDrivescorpora with caution as it has a broad scope and can affect performance.
Files can move freely between corpora as permissions and ownership change.
Here are a few next steps you might take: