gcs_rm: Delete a file or a directory

Description Usage Arguments Value Examples

View source: R/cloud-functions.R

Description

Delete a file or a directory. The path to a directory *must* have a tailing slash so that the function can distinguish it from a file path.

Usage

1
gcs_rm(path, billing_project = gcs_get_requester_pays(), quiet = FALSE)

Arguments

path

The character path to a bucket/folder/file or a FolderClass/FileClass object returned by 'gcs_dir'.

billing_project

logical(1) or character(1). If logical, whether users should pay the cost for accessing the data. The billing project is the project ID in 'gcs_get_billing_project()'. If character, it represents the project ID that will be charged by Google.

quiet

Whether to require the user's confirmation before deleting a directory.

Value

No return value.

Examples

1
2
3
4
5
6
7
8
## remove the entire content in a bucket
## gcs_rm("myBucket")

## remove a folder in a bucket
## gcs_rm("myBucket/myFolder/")

## remove a file in a bucket
## gcs_rm("myBucket/myFolder/myFile")

Jiefei-Wang/GCSConnection documentation built on Sept. 12, 2020, 7:22 a.m.