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: 77 x 4 #> mime_type ext human_type default #> <chr> <chr> <chr> <lgl> #> 1 application/x-vnd.oasis.opendocument.presentation <NA> <NA> NA #> 2 text/tab-separated-values tsv tsv TRUE #> 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.word… dotx dotx TRUE #> 10 application/vnd.ms-powerpoint.presentation.macroen… <NA> <NA> NA #> # ... with 67 more rows
drive_fields(expose())
#> # A tibble: 51 x 2 #> name desc #> <chr> <chr> #> 1 appProperties "A collection of arbitrary key-value pairs which ar… #> 2 capabilities Capabilities the current user has on this file. Eac… #> 3 contentHints Additional information about the content of the fil… #> 4 createdTime The time at which the file was created (RFC 3339 da… #> 5 description A short description of the file. #> 6 explicitlyTrashed Whether the file has been explicitly trashed, as op… #> 7 fileExtension The final component of fullFileExtension. This is o… #> 8 folderColorRgb "The color for a folder as an RGB hex string. The s… #> 9 fullFileExtension "The full file extension extracted from the name fi… #> 10 hasAugmentedPermissions Whether any users are granted file access directly … #> # ... with 41 more rows