WARNING: I think this documentation from wasmer may be incorrect, based on the implementation details in wasix-libc
The path_link()
function creates a hard link between two files. It creates a new directory entry with the specified name in the destination directory, which refers to the same underlying file as the source file.
On POSIX systems, a similar functionality is provided by the link()
function. It creates a new link (directory entry) for an existing file. The new link and the original file refer to the same inode and share the same content.
Note
The path_link()
function creates a hard link between two files. It checks if the necessary rights are present on both the source and target directories. It then creates a new directory entry in the target directory with the specified name, linking it to the source file.
On POSIX systems, a similar functionality is provided by the link()
function.