testwhat (version 4.2.2)

test_wd: Test whether a file exists

Description

Test whether a file exists

Usage

test_file_exists(path, incorrect_msg = NULL)
check_wd(state, path, missing_msg = NULL)

Arguments

path
Path to the file you want to check
incorrect_msg
Custom feedback message in case the file does not exist
state
the state to start from
missing_msg
Custom feedback message in case the file is missing

Examples

Run this code
## Not run: 
# # Example 1 solution code:
# # write("hello", file = "test.txt")
# 
# # SCT Option 1 to test if file exists
# test_file_exists("test.txt")
# 
# # SCT Option 2 to test if file exists
# ex() %>% check_wd("test.txt")
# ## End(Not run)

Run the code above in your browser using DataLab