Прочетете на английски Редактиране

Споделяне чрез


FileSystemInfo.CreateAsSymbolicLink(String) Method

Definition

Creates a symbolic link located in FullName that points to the specified pathToTarget.

C#
public void CreateAsSymbolicLink(string pathToTarget);

Parameters

pathToTarget
String

The path of the symbolic link target.

Exceptions

pathToTarget is null.

pathToTarget is empty.

-or-

pathToTarget contains invalid path characters.

A file or directory already exists in the location of FullName.

-or-

An I/O error occurred.

Applies to

Продукт Версии
.NET 6, 7, 8, 9, 10

See also