createLink

0th

Percentile

Creates a link to a file or a directory

Creates a link to a file or a directory. First it tries to create a (Unix-like) symbolic link and if that was not successful it tries to create a Windows Shortcut link. If neither works, an exception is thrown.

Keywords
file, IO
Usage
## S3 method for class 'default':
createLink(link=".", target, overwrite=FALSE, methods=c("unix-symlink", "windows-ntfs-symlink", "windows-shortcut"), ...)
Arguments
link
The path or pathname of the link to be created. If "." (or NULL), it is inferred from the target argument.
target
The target file or directory to which the shortcut should point to.
overwrite
If TRUE, an existing link file is overwritten, otherwise not.
methods
A character vector specifying what methods (and in what order) should be tried for creating links.
...
Not used.
Value

  • Returns (invisibly) the path or pathname to the destination.

See Also

createWindowsShortcut() and file.symlink()

Aliases
  • createLink.default
  • createLink
Documentation reproduced from package R.utils, version 1.7.3, License: LGPL (>= 2.1)

Community examples

Looks like there are no examples yet.