Home > @rushstack/node-core-library > FileSystem > createSymbolicLinkFolder
FileSystem.createSymbolicLinkFolder() method
Creates a symbolic link to a folder. On Windows operating systems, this may require administrator elevation. Behind the scenes it uses fs.symlinkSync()
.
Signature:
static createSymbolicLinkFolder(options: IFileSystemCreateLinkOptions): void;
Parameters
Parameter | Type | Description |
---|---|---|
options | IFileSystemCreateLinkOptions |
Returns:
void
Remarks
To avoid administrator elevation on Windows, use FileSystem.createSymbolicLinkJunction() instead.
On Windows operating systems, the NTFS file system distinguishes file symlinks versus directory symlinks: If the target is not the correct type, the symlink will be created successfully, but will fail to resolve. Other operating systems do not make this distinction, in which case FileSystem.createSymbolicLinkFile() and FileSystem.createSymbolicLinkFolder() can be used interchangeably, but doing so will make your tool incompatible with Windows.