symlink function

void symlink(
  1. String existingPath,
  2. String linkPath
)

Creates a link at linkPath which points to an existing file or directory at existingPath

On Windows you need to be in developer mode or running as an Administrator to create a symlink.

To enable developer mode see: https://dcli.onepub.dev/getting-started/installing-on-windows

To check if your script is running as an administrator use:

Shell.current.isPrivileged

See:

Implementation

void symlink(
  String existingPath,
  String linkPath,
) {
  verbose(() => 'symlink existingPath: $existingPath linkPath $linkPath');
  Link(linkPath).createSync(existingPath);
}