linkOrCopy: Create link to file, falling back to making a copy if linking...

View source: R/helpers.R

linkOrCopyR Documentation

Create link to file, falling back to making a copy if linking fails.

Description

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.

Usage

linkOrCopy(from, to, allowSymlink = FALSE)

fileRenameOrMove(from, to)

Arguments

from, to

character vectors, containing file names or paths.

allowSymlink

Logical. If FALSE, the default, then it will try file.link first, then file.copy, omitting the file.symlink step


PredictiveEcology/Require documentation built on Nov. 5, 2024, 12:57 p.m.