real_dir <- system.file("tests", package = "assertions")
try({
assert_directory_does_not_exist("foo") # Passes
assert_directory_does_not_exist(real_dir) # Throws error
assert_directory_does_not_exist(c("foo", "bar")) # Throws Error (single file only)
})
Run the code above in your browser using DataLab