gcs_rm {GCSConnection} | R Documentation |
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.
gcs_rm(path, billing_project = gcs_get_requester_pays(), quiet = FALSE)
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. |
No return value.
## 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")