checkFilename: Check if a file can be created

View source: R/fitPolyTools.R

checkFilenameR Documentation

Check if a file can be created

Description

Checks if a file with that name can be created. If successful, any pre-existing file does not exist any more.

Usage

checkFilename(filename, overwrite=TRUE)

Arguments

filename

a file name with or without path. If the name contains a path the entire path must already exist, else the file cannot be created and the result is FALSE.

overwrite

if TRUE an attempt is made to delete any pre-existing file of that name; the function returns FALSE if the file is locked or the user has no rights to delete the file. If FALSE the function returns FALSE if any file of that name already exists, and no attempt is made to remove it

Value

TRUE if a new file can be created, else FALSE. If TRUE, no file of that name exists (any more)


fitPoly documentation built on April 3, 2025, 8:58 p.m.