expose() returns a sentinel object, similar in spirit to NULL, that tells the calling function to return its internal data structure. googledrive stores a lot 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 × 5
#>    mime_type                             ext   description    human_type default
#>    <chr>                                 <chr> <chr>          <chr>      <lgl>  
#>  1 application/epub+zip                  NA    NA             NA         NA     
#>  2 application/msword                    doc   NA             doc        TRUE   
#>  3 application/msword                    dot   NA             dot        FALSE  
#>  4 application/pdf                       pdf   NA             pdf        TRUE   
#>  5 application/rtf                       rtf   NA             rtf        TRUE   
#>  6 application/vnd.google-apps.audio     NA    NA             audio      NA     
#>  7 application/vnd.google-apps.document  NA    Google Docs    document   NA     
#>  8 application/vnd.google-apps.drawing   NA    Google Drawing drawing    NA     
#>  9 application/vnd.google-apps.drive-sdk NA    3rd party sho… drive-sdk  NA     
#> 10 application/vnd.google-apps.file      NA    Google Drive … file       NA     
#> # … with 68 more rows
drive_fields(expose())
#> # A tibble: 55 × 2
#>    name                         desc                                            
#>    <chr>                        <chr>                                           
#>  1 appProperties                "A collection of arbitrary key-value pairs whic…
#>  2 capabilities                 "Capabilities the current user has on this file…
#>  3 contentHints                 "Additional information about the content of th…
#>  4 copyRequiresWriterPermission "Whether the options to copy, print, or downloa…
#>  5 createdTime                  "The time at which the file was created (RFC 33…
#>  6 description                  "A short description of the file."              
#>  7 driveId                      "ID of the shared drive the file resides in. On…
#>  8 explicitlyTrashed            "Whether the file has been explicitly trashed, …
#>  9 exportLinks                  "Links for exporting Google Docs to specific fo…
#> 10 fileExtension                "The final component of fullFileExtension. This…
#> # … with 45 more rows