Description Usage Arguments Value See Also Examples
Grant individuals or other groups access to files, including permission to
read, comment, or edit. The returned dribble
will have extra columns,
shared
and permissions_resource
. Read more in drive_reveal()
.
drive_share_anyone()
is a convenience wrapper for a common special case:
"make this file
readable by 'anyone with a link'".
1 2 3 4 5 6 7 8 9 | drive_share(
file,
role = c("reader", "commenter", "writer", "fileOrganizer", "owner", "organizer"),
type = c("user", "group", "domain", "anyone"),
...,
verbose = deprecated()
)
drive_share_anyone(file, verbose = deprecated())
|
An object of class dribble
, a tibble with one row per file.
There will be extra columns, shared
and
permissions_resource
.
Wraps the permissions.create
endpoint:
Drive roles and permissions are described here:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # Create a file to share
file <- drive_example_remote("chicken_doc") %>%
drive_cp(name = "chicken-share.txt")
# Let a specific person comment
file <- file %>%
drive_share(
role = "commenter",
type = "user",
emailAddress = "susan@example.com"
)
# Let a different specific person edit and customize the email notification
file <- file %>%
drive_share(
role = "writer",
type = "user",
emailAddress = "carol@example.com",
emailMessage = "Would appreciate your feedback on this!"
)
# Let anyone read the file
file <- file %>%
drive_share(role = "reader", type = "anyone")
# Single-purpose wrapper function for this
drive_share_anyone(file)
# Clean up
drive_rm(file)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.