powered by
Save a single file from the cloud to your local drive
import_file(bucketpath, localfile, data_source = flyio_get_datasource(), bucket = flyio_get_bucket(data_source), overwrite = TRUE, show_progress = FALSE, ...)
path of file in the bucket
path where the file needs to be downloaded. The file name and extension also need to be present; if not, the current file name will be considered
the name of the data source, if not set globally, gcs or s3
the name of the bucket, if not set globally
logical. If the files should be overwritten if already present
logical. Shows progress of the download operation
other parameters for gcs_get_object or save_object
the filename and path of the object saved to local
# NOT RUN { # import data from GCS to Local flyio_set_datasource("gcs") flyio_set_bucket("your-bucket-name") import_file("mtcars.csv", paste0(tempdir(), "/mtcars.csv"), overwrite = T) # }
Run the code above in your browser using DataLab