mock_file: Mock file

View source: R/mock_file.R

mock_fileR Documentation

Mock file

Description

Mock file

Usage

mock_file(path, payload)

Arguments

path

(character) a file path. required

payload

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

Value

a list with S3 class mock_file

Examples

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

ropensci/webmockr documentation built on June 14, 2025, 1:24 p.m.