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 #> <chr> #> 1 application/x-vnd.oasis.opendocument.presentation #> 2 text/tab-separated-values #> 3 image/jpeg #> 4 image/jpeg #> 5 image/jpeg #> 6 image/bmp #> 7 image/gif #> 8 application/vnd.ms-excel.sheet.macroenabled.12 #> 9 application/vnd.openxmlformats-officedocument.wordprocessingml.template #> 10 application/vnd.ms-powerpoint.presentation.macroenabled.12 #> # ... with 67 more rows, and 3 more variables: ext <chr>, human_type <chr>, #> # default <lgl>
drive_fields(expose())
#> # A tibble: 51 x 2 #> name #> <chr> #> 1 appProperties #> 2 capabilities #> 3 contentHints #> 4 createdTime #> 5 description #> 6 explicitlyTrashed #> 7 fileExtension #> 8 folderColorRgb #> 9 fullFileExtension #> 10 hasAugmentedPermissions #> # ... with 41 more rows, and 1 more variables: desc <chr>