The only built-in cassette persister. Persists cassettes to the file system.
Details
Private Methods
storage_location()
Get storage location
absolute_path_to_file()
Get absolute path to the
storage_location
Public fields
file_name
(character) the file name, not whole path
write_fxn
(character) fxn to use for writing to disk
content
(character) content to record to a cassette
path
(character) storage directory for cassettes
write2disk
(character) write to disk or make a new FileSystem
Methods
Method new()
Create a new FileSystem
object
Usage
FileSystem$new(
file_name = NULL,
write_fxn = NULL,
content = NULL,
path = NULL,
write2disk = FALSE
)
Arguments
file_name
(character) the file name, not whole path
write_fxn
(character) fxn to use for writing to disk
content
(character) content to record to a cassette
path
(character) storage directory for cassettes
write2disk
(logical) write to disk or just make a new FileSystem object. Default:
FALSE
Method get_cassette()
Gets the cassette for the given storage key (file name)
Returns
named list, from yaml::yaml.load_file
Method set_cassette()
Sets the cassette for the given storage key (file name)