Learn R Programming

webmockr (version 2.0.0)

mock_file: Mock file

Description

Mock file

Usage

mock_file(path, payload)

Value

a list with S3 class mock_file

Arguments

path

(character) a file path. required

payload

(character) string to be written to the file given at path parameter. required

Examples

Run this code
mock_file(path = tempfile(), payload = "{\"foo\": \"bar\"}")

Run the code above in your browser using DataLab