# NOT RUN {
# 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)
# }
Run the code above in your browser using DataLab