Create link to file, falling back to making a copy if linking fails.
Source:R/helpers.R
linkOrCopy.Rd
First try to create a hardlink to the file. If that fails, try a symbolic link (symlink) before falling back to copying the file. "File" here can mean a file or a directory.