Skip to contents

check_read verifies that path name exists and that file name, together with extension, has been correctly specified.

Usage

check_read(pathname = pathname, filename = filename)

Arguments

pathname

character string with valid path to a folder.

filename

character string specifying the name of the file with its extension.

Value

If successful, it returns nothing.

Examples


# Create a silly example text file.
sink("example.100")
i <- 1:10
outer(i, i)
sink()

# Check it exists and it has a valid CENTURY file extension.
check_read(getwd(), "example.100")
#> Error in check_read(getwd(), "example.100"): could not find function "check_read"

# Remove the silly example text file.
invisible(file.remove("example.100"))