std::experimental::filesystem::create_symlink, (3) - Linux Manuals
Defined in header
Creates a symbolic link link with its target set to target as if by POSIX symlink():
the pathname target may be invalid or non-existing.
Some operating systems require symlink creation to identify that the link is to a
directory. Portable code should use
(1), even though there is no distinction on POSIX systems.
target - path to point the symlink to, does not have to exist
The overload that does not take a error_code&
underlying OS API errors, constructed with target as the first argument, link as the
second argument, and the OS error code as the error code argument. std::bad_alloc
may be thrown if memory allocation fails. The overload taking a error_code&
parameter sets it to the OS API error code if an OS API call fails, and executes
Some operating systems do not support symbolic links at all or support them only for
Some file systems do not support symbolic links regardless of the operating system,
for example the FAT system used on some memory cards and flash drives.
Like a hard link, a symbolic link allows a file to have multiple logical names. The
presence of a hard link guarantees the existence of a file, even after the original
name has been removed. A symbolic link provides no such assurance;
named by the target argument need not exist when the link is created. A symbolic
link can cross file system boundaries.
// Run this code
create_hard_link creates a hard link