Check if a filename is valid for writing by trying to create the file. If the filename contains a path, result will only be TRUE if the whole path already exists
checkFilename(filename, overwrite = TRUE)
The filename to check
if TRUE (default) an existing file of that name will be deleted (if it is not protected by being locked, read-only, owned by another user etc)