Nothing
if (interactive()) {
pkgload::load_all()
library("tinytest")
}
dir.create(file.path(tempdir(), "new"))
touch(file.path(tempdir(), "file1.txt"))
Sys.sleep(2)
touch(file.path(tempdir(), "file2.txt"))
Sys.sleep(2)
touch(file.path(tempdir(), "new", "file3.txt"))
expectation <- "file2.txt"
found <- file_modified_last(path = tempdir(), pattern = "file.\\.txt$")
result <- basename(found)
expect_identical(expectation, result)
expectation <- "file3.txt"
found <- file_modified_last(
path = tempdir(), pattern = "file.\\.txt$",
recursive = TRUE
)
result <- basename(found)
expect_identical(expectation, result)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.