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: 89 × 5
#>    mime_type                             ext   description    human_type default
#>    <chr>                                 <chr> <chr>          <chr>      <lgl>  
#>  1 application/epub+zip                  epub  NA             epub       FALSE  
#>  2 application/msword                    doc   NA             doc        TRUE   
#>  3 application/pdf                       pdf   NA             pdf        TRUE   
#>  4 application/rtf                       rtf   NA             rtf        TRUE   
#>  5 application/vnd.google-apps.audio     NA    NA             audio      NA     
#>  6 application/vnd.google-apps.document  NA    Google Docs    document   NA     
#>  7 application/vnd.google-apps.drawing   NA    Google Drawin… drawing    NA     
#>  8 application/vnd.google-apps.drive-sdk NA    Third-party s… drive-sdk  NA     
#>  9 application/vnd.google-apps.file      NA    Google Drive … file       NA     
#> 10 application/vnd.google-apps.folder    NA    Google Drive … folder     NA     
#> # ℹ 79 more rows
drive_fields(expose())
#> # A tibble: 64 × 2
#>    name                         desc                                            
#>    <chr>                        <chr>                                           
#>  1 appProperties                "A collection of arbitrary key-value pairs whic…
#>  2 capabilities                 "Output only. Capabilities the current user has…
#>  3 contentHints                 "Additional information about the content of th…
#>  4 contentRestrictions          "Restrictions for accessing the content of the …
#>  5 copyRequiresWriterPermission "Whether the options to copy, print, or downloa…
#>  6 createdTime                  "The time at which the file was created (RFC 33…
#>  7 description                  "A short description of the file."              
#>  8 downloadRestrictions         "Download restrictions applied on the file."    
#>  9 driveId                      "Output only. ID of the shared drive the file r…
#> 10 explicitlyTrashed            "Output only. Whether the file has been explici…
#> # ℹ 54 more rows