@@ -112,9 +112,9 @@ files by name (path, really) or by Drive file id using `drive_get()`.
112112(x <- drive_get(" ~/abc/def/googledrive-NEWS.md" ))
113113# > ✔ The input `path` resolved to exactly 1 file.
114114# > # A dribble: 1 × 4
115- # > name path id drive_resource
116- # > <chr> <chr> <drv_id> <list>
117- # > 1 googledrive-NEWS.md ~/abc/def/googledrive-NEWS.md 1h1lhFfQrDZe … <named list>
115+ # > name path id drive_resource
116+ # > <chr> <chr> <drv_id> <list>
117+ # > 1 googledrive-NEWS.md ~/abc/def/googledrive-NEWS.md 1h1lhFf … <named list [41] >
118118```
119119
120120` as_id() ` can be used to convert various inputs into a marked vector of
@@ -155,15 +155,15 @@ We can upload any file type.
155155 " index-chicken.csv"
156156))
157157# > Local file:
158- # > • '/private/tmp/RtmpiLJKwa/temp_libpath39ea21793ac /googledrive/extdata/example_files/chicken.csv'
158+ # > • '/private/tmp/Rtmpk4twsE/temp_libpath10e8b70beb6a9 /googledrive/extdata/example_files/chicken.csv'
159159# > Uploaded into Drive file:
160- # > • 'index-chicken.csv' <id: 11Qt438Qei_SPbBpQQmukIel1lqlN5rkt >
160+ # > • 'index-chicken.csv' <id: 1dE2U3TUvYulwE88ucBPQHP0-CB4zEK7P >
161161# > With MIME type:
162162# > • 'text/csv'
163163# > # A dribble: 1 × 3
164164# > name id drive_resource
165165# > <chr> <drv_id> <list>
166- # > 1 index-chicken.csv 11Qt438Qei_SPbBpQQmukIel1lqlN5rkt <named list [41]>
166+ # > 1 index-chicken.csv 1dE2U3TUvYulwE88ucBPQHP0-CB4zEK7P <named list [41]>
167167```
168168
169169Notice that file was uploaded as ` text/csv ` . Since this was a ` .csv `
@@ -174,7 +174,7 @@ Google Spreadsheet. Let’s delete this file first.
174174``` r
175175drive_rm(chicken )
176176# > File deleted:
177- # > • 'index-chicken.csv' <id: 11Qt438Qei_SPbBpQQmukIel1lqlN5rkt >
177+ # > • 'index-chicken.csv' <id: 1dE2U3TUvYulwE88ucBPQHP0-CB4zEK7P >
178178
179179# example of using a dribble as input
180180chicken_sheet <- drive_example_local(" chicken.csv" ) %> %
@@ -183,9 +183,9 @@ chicken_sheet <- drive_example_local("chicken.csv") %>%
183183 type = " spreadsheet"
184184 )
185185# > Local file:
186- # > • '/private/tmp/RtmpiLJKwa/temp_libpath39ea21793ac /googledrive/extdata/example_files/chicken.csv'
186+ # > • '/private/tmp/Rtmpk4twsE/temp_libpath10e8b70beb6a9 /googledrive/extdata/example_files/chicken.csv'
187187# > Uploaded into Drive file:
188- # > • 'index-chicken-sheet' <id: 1ol2RLc9TmlMUgrp-7lvchd_T2FuLFQq4y95-3itYJ0g >
188+ # > • 'index-chicken-sheet' <id: 1KXgDfk3IfJg833XokFhKDahY9aDml-183NHPz3qXlAY >
189189# > With MIME type:
190190# > • 'application/vnd.google-apps.spreadsheet'
191191```
@@ -203,9 +203,9 @@ and parks more detailed metadata in a `permissions_resource` variable.
203203chicken_sheet %> %
204204 drive_reveal(" permissions" )
205205# > # A dribble: 1 × 5
206- # > name shared id drive_resource permissions_resource
207- # > <chr> <lgl> <drv_id> <list> <list>
208- # > 1 index-chicken-sheet FALSE 1ol2RLc9TmlMUg … <named list> <named list [2]>
206+ # > name shared id drive_resource permissions_resource
207+ # > <chr> <lgl> <drv_id> <list> <list>
208+ # > 1 index-chicken-sheet FALSE 1KXgDfk … <named list [36]> <named list [2]>
209209```
210210
211211Here’s how to grant anyone with the link permission to view this data
@@ -218,11 +218,11 @@ set.
218218# > • role = reader
219219# > • type = anyone
220220# > For file:
221- # > • 'index-chicken-sheet' <id: 1ol2RLc9TmlMUgrp-7lvchd_T2FuLFQq4y95-3itYJ0g >
221+ # > • 'index-chicken-sheet' <id: 1KXgDfk3IfJg833XokFhKDahY9aDml-183NHPz3qXlAY >
222222# > # A dribble: 1 × 5
223- # > name shared id drive_resource permissions_resource
224- # > <chr> <lgl> <drv_id> <list> <list>
225- # > 1 index-chicken-sheet TRUE 1ol2RLc9TmlMUg … <named list> <named list [2]>
223+ # > name shared id drive_resource permissions_resource
224+ # > <chr> <lgl> <drv_id> <list> <list>
225+ # > 1 index-chicken-sheet TRUE 1KXgDfk … <named list [37]> <named list [2]>
226226```
227227
228228This comes up so often, there’s even a convenience wrapper,
@@ -240,9 +240,9 @@ variable.
240240chicken_sheet %> %
241241 drive_reveal(" published" )
242242# > # A dribble: 1 × 7
243- # > name published shared id drive_resource permissions_resource
244- # > <chr> <lgl> <lgl> <drv > <list> <list>
245- # > 1 index-chicken-sheet FALSE TRUE 1ol2 … <named list> <named list [2]>
243+ # > name published shared id drive_resource permissions_resource
244+ # > <chr> <lgl> <lgl> <drv_id > <list> <list>
245+ # > 1 index-chicken-s… FALSE TRUE 1KXgDfk … <named list> <named list [2]>
246246# > # ℹ 1 more variable: revision_resource <list>
247247```
248248
@@ -251,11 +251,11 @@ By default, `drive_publish()` will publish your most recent version.
251251``` r
252252(chicken_sheet <- drive_publish(chicken_sheet ))
253253# > File now published:
254- # > • 'index-chicken-sheet' <id: 1ol2RLc9TmlMUgrp-7lvchd_T2FuLFQq4y95-3itYJ0g >
254+ # > • 'index-chicken-sheet' <id: 1KXgDfk3IfJg833XokFhKDahY9aDml-183NHPz3qXlAY >
255255# > # A dribble: 1 × 7
256- # > name published shared id drive_resource permissions_resource
257- # > <chr> <lgl> <lgl> <drv > <list> <list>
258- # > 1 index-chicken-sheet TRUE TRUE 1ol2 … <named list> <named list [2]>
256+ # > name published shared id drive_resource permissions_resource
257+ # > <chr> <lgl> <lgl> <drv_id > <list> <list>
258+ # > 1 index-chicken-s… TRUE TRUE 1KXgDfk … <named list> <named list [2]>
259259# > # ℹ 1 more variable: revision_resource <list>
260260```
261261
@@ -273,7 +273,7 @@ extension in `path`. For example, if I would like to download the
273273``` r
274274drive_download(" index-chicken-sheet" , type = " csv" )
275275# > File downloaded:
276- # > • 'index-chicken-sheet' <id: 1ol2RLc9TmlMUgrp-7lvchd_T2FuLFQq4y95-3itYJ0g >
276+ # > • 'index-chicken-sheet' <id: 1KXgDfk3IfJg833XokFhKDahY9aDml-183NHPz3qXlAY >
277277# > Saved locally as:
278278# > • 'index-chicken-sheet.csv'
279279```
@@ -287,7 +287,7 @@ drive_download(
287287 overwrite = TRUE
288288)
289289# > File downloaded:
290- # > • 'index-chicken-sheet' <id: 1ol2RLc9TmlMUgrp-7lvchd_T2FuLFQq4y95-3itYJ0g >
290+ # > • 'index-chicken-sheet' <id: 1KXgDfk3IfJg833XokFhKDahY9aDml-183NHPz3qXlAY >
291291# > Saved locally as:
292292# > • 'index-chicken-sheet.csv'
293293```
@@ -301,7 +301,7 @@ Google Sheets, this is an Excel workbook:
301301``` r
302302drive_download(" index-chicken-sheet" )
303303# > File downloaded:
304- # > • 'index-chicken-sheet' <id: 1ol2RLc9TmlMUgrp-7lvchd_T2FuLFQq4y95-3itYJ0g >
304+ # > • 'index-chicken-sheet' <id: 1KXgDfk3IfJg833XokFhKDahY9aDml-183NHPz3qXlAY >
305305# > Saved locally as:
306306# > • 'index-chicken-sheet.xlsx'
307307```
@@ -336,7 +336,7 @@ file.remove(c(
336336# > [1] TRUE TRUE TRUE
337337drive_find(" index-chicken" ) %> % drive_rm()
338338# > File deleted:
339- # > • 'index-chicken-sheet' <id: 1ol2RLc9TmlMUgrp-7lvchd_T2FuLFQq4y95-3itYJ0g >
339+ # > • 'index-chicken-sheet' <id: 1KXgDfk3IfJg833XokFhKDahY9aDml-183NHPz3qXlAY >
340340```
341341
342342## Privacy
0 commit comments