Create a symlink
path_symlink (
old_path: i32A wasm pointer to a null-terminated string containing the source path of the symlinkold_path_len: i32The length of the old_path stringfd: i32The file descriptor representing the base directory from which the paths are understoodnew_path: i32A wasm pointer to a null-terminated string containing the target path where the symlink will be creatednew_path_len: i32The length of the new_path string
) => The path_symlink()
function creates a symbolic link (symlink) with the specified source path pointing to the target path. It requires the PATH_SYMLINK
right on the base directory.
On POSIX systems, a similar functionality is provided by the symlink()
function. It creates a symbolic link with the specified source and target paths. The symlink()
function is part of the POSIX standard and is widely supported across different platforms.
Note
The path_symlink()
function creates a symbolic link (symlink) with the specified source path pointing to the target path. It checks the necessary rights on the base directory. On POSIX systems, a similar functionality is provided by the symlink()
function.