Skip to contents

Coerce names, etc. to cassettes

Coerce to a cassette path

Usage

as.cassette(x, ...)

as.cassettepath(x)

Arguments

x

Input, a cassette name (character), or something that can be coerced to a cassette

...

further arguments passed on to cassettes() or [read_cassette_meta()

Value

a cassette of class Cassette

Examples

if (FALSE) { # \dontrun{
vcr_configure(dir = tempfile())
insert_cassette("foobar")
cassettes(on_disk = FALSE)
cassettes(on_disk = TRUE)
as.cassette("foobar", on_disk = FALSE)
eject_cassette() # eject the current cassette

# cleanup
unlink(file.path(tempfile(), "foobar.yml"))
} # }