Retrieve a file from Filebin

file_get(filename, bin, file = NA, overwrite = FALSE)

Arguments

filename

File name or URL.

bin

Bin name. If NA the generate random bin name.

file

File name to use to save results. If FALSE then don't save to file.

overwrite

Whether to overwrite existing file.

Value

Contents of file.

Examples

if (FALSE) {
posted <- file_post(LOREM_IPSUM, bin = "latin-text")

# Discard path and just retain filename.
filename <- basename(LOREM_IPSUM)
file_get(filename, "latin-text")

# Delete downloaded file.
file.remove(filename)
}