expose() returns a sentinel object, similar in spirit to NULL, that tells the calling function to return its internal data structure. googledrive stores alot of information about the Drive API, MIME types, etc., internally and then exploits it in helper functions, like drive_mime_type(), drive_fields(), drive_endpoints(), etc. We use these objects to provide nice defaults, check input validity, or lookup something cryptic, like MIME type, based on something friendlier, like a file extension. Pass expose() to such a function if you want to inspect its internal object, in its full glory. This is inspired by the waiver() object in ggplot2.

expose()

Examples

drive_mime_type(expose())
#> # A tibble: 78 x 4 #> mime_type ext human_type default #> <chr> <chr> <chr> <lgl> #> 1 text/tab-separated-values tsv tsv TRUE #> 2 application/x-vnd.oasis.opendocument.presentation <NA> <NA> NA #> 3 image/jpeg jpeg jpeg TRUE #> 4 image/jpeg jpg jpg FALSE #> 5 image/jpeg jpe jpe FALSE #> 6 image/bmp <NA> <NA> NA #> 7 image/gif gif gif TRUE #> 8 application/vnd.ms-excel.sheet.macroenabled.12 <NA> <NA> NA #> 9 application/vnd.openxmlformats-officedocument.wordp… dotx dotx TRUE #> 10 application/vnd.ms-powerpoint.presentation.macroena… <NA> <NA> NA #> # … with 68 more rows
drive_fields(expose())
#> # A tibble: 55 x 2 #> name desc #> <chr> <chr> #> 1 appProperties "A collection of arbitrary key-value pairs which are p… #> 2 capabilities "Capabilities the current user has on this file. Each … #> 3 contentHints "Additional information about the content of the file.… #> 4 copyRequiresWriterPe… "Whether the options to copy, print, or download this … #> 5 createdTime "The time at which the file was created (RFC 3339 date… #> 6 description "A short description of the file." #> 7 driveId "ID of the shared drive the file resides in. Only popu… #> 8 explicitlyTrashed "Whether the file has been explicitly trashed, as oppo… #> 9 exportLinks "Links for exporting Google Docs to specific formats." #> 10 fileExtension "The final component of fullFileExtension. This is onl… #> # … with 45 more rows