llvm::sys::fs::create_symlink

Create a symbolic link from from to to.

Synopsis

Declared in <llvm/Support/FileSystem.h>

std::error_code
create_symlink(
    Twine const& to,
    Twine const& from);

Description

This may fail on Windows if run without create symbolic link permissions.

On Windows

  • slashes in the symlink target are normalized to , and

  • if to does not exist, it will always create a file symlink.

Return Value

errc::success if the link was created, otherwise a platform specific error_code.

Parameters

NameDescription
toThe path to the symlink target.
fromThe path of the symlink to create.