File.CreateSymbolicLink(String, String) Methode

Definition

Erstellt eine durch identifizierte symbolische path Dateiverbindung, die auf pathToTarget verweist.

public:
 static System::IO::FileSystemInfo ^ CreateSymbolicLink(System::String ^ path, System::String ^ pathToTarget);
public static System.IO.FileSystemInfo CreateSymbolicLink (string path, string pathToTarget);
static member CreateSymbolicLink : string * string -> System.IO.FileSystemInfo
Public Shared Function CreateSymbolicLink (path As String, pathToTarget As String) As FileSystemInfo

Parameter

path
String

Der Pfad, in dem die symbolische Verknüpfung erstellt werden soll.

pathToTarget
String

Der Pfad des Ziels, auf das die symbolische Verknüpfung verweist.

Gibt zurück

FileSystemInfo

Eine FileInfo -Instanz, die die neu erstellte symbolische Verknüpfung der Datei umschließt.

Ausnahmen

path oder pathToTarget ist null.

path oder pathToTarget ist leer.

Oder

path oder pathToTarget enthält ein null Zeichen.

Am Speicherort von ist bereits eine Datei oder ein Verzeichnis path vorhanden.

- oder -

E/A-Fehler

Gilt für

Siehe auch