Learn R Programming

flyio (version 0.1.4)

file_exists: Check if a file exists

Description

Check if a file exists

Usage

file_exists(path, data_source = flyio_get_datasource(),
  bucket = flyio_get_bucket(data_source))

Arguments

path

the entire path for the file

data_source

the name of the data source, if not set globally. s3, gsc or local

bucket

the name of the bucket, if not set globally

Value

logical. if the file exists or not

Examples

Run this code
# NOT RUN {
# Check with data source local
file_exists(path = "tests/mtcars.csv", data_source = "local")
# }
# NOT RUN {
# Check with data source GCS
flyio_set_datasource("gcs")
flyio_set_bucket("your-bucket-name")
file_exists(path = "tests/mtcars.csv")
# }

Run the code above in your browser using DataLab