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()
drive_mime_type(expose())#> [90m# A tibble: 77 x 4[39m #> mime_type ext human_type default #> [3m[90m<chr>[39m[23m [3m[90m<chr>[39m[23m [3m[90m<chr>[39m[23m [3m[90m<lgl>[39m[23m #> [90m 1[39m application/x-vnd.oasis.opendocument.presentation [31mNA[39m [31mNA[39m [31mNA[39m #> [90m 2[39m text/tab-separated-values tsv tsv TRUE #> [90m 3[39m image/jpeg jpeg jpeg TRUE #> [90m 4[39m image/jpeg jpg jpg FALSE #> [90m 5[39m image/jpeg jpe jpe FALSE #> [90m 6[39m image/bmp [31mNA[39m [31mNA[39m [31mNA[39m #> [90m 7[39m image/gif gif gif TRUE #> [90m 8[39m application/vnd.ms-excel.sheet.macroenabled.12 [31mNA[39m [31mNA[39m [31mNA[39m #> [90m 9[39m application/vnd.openxmlformats-officedocument.word… dotx dotx TRUE #> [90m10[39m application/vnd.ms-powerpoint.presentation.macroen… [31mNA[39m [31mNA[39m [31mNA[39m #> [90m# … with 67 more rows[39mdrive_fields(expose())#> [90m# A tibble: 51 x 2[39m #> name desc #> [3m[90m<chr>[39m[23m [3m[90m<chr>[39m[23m #> [90m 1[39m appProperties [90m"[39mA collection of arbitrary key-value pairs which are pri… #> [90m 2[39m capabilities Capabilities the current user has on this file. Each cap… #> [90m 3[39m contentHints Additional information about the content of the file. Th… #> [90m 4[39m createdTime The time at which the file was created (RFC 3339 date-ti… #> [90m 5[39m description A short description of the file. #> [90m 6[39m explicitlyTrashed Whether the file has been explicitly trashed, as opposed… #> [90m 7[39m fileExtension The final component of fullFileExtension. This is only a… #> [90m 8[39m folderColorRgb [90m"[39mThe color for a folder as an RGB hex string. The suppor… #> [90m 9[39m fullFileExtension [90m"[39mThe full file extension extracted from the name field. … #> [90m10[39m hasAugmentedPermi… Whether any users are granted file access directly on th… #> [90m# … with 41 more rows[39m