Namespaces
Variants

std::experimental::filesystem:: copy_symlink

From cppreference.net
Definiert im Header <experimental/filesystem>
void copy_symlink ( const path & from, const path & to ) ;
(1) (filesystem TS)
void copy_symlink ( const path & from, const path & to,
error_code & ec ) ;
(2) (filesystem TS)

Kopiert einen symbolischen Link an einen anderen Ort.

1) Ruft effektiv f ( read_symlink ( from ) , to ) auf, wobei f entweder create_symlink ( ) oder create_directory_symlink ist, abhängig davon, ob from auf eine Datei oder ein Verzeichnis verweist.
2) Ruft effektiv f ( read_symlink ( from, ec ) , to, ec ) auf, wobei f entweder create_symlink ( ) oder create_directory_symlink ist, abhängig davon, ob from auf eine Datei oder ein Verzeichnis verweist.

Inhaltsverzeichnis

Parameter

from - Pfad zu einem symbolischen Link, der kopiert werden soll
to - Zielpfad des neuen symbolischen Links
ec - Out-Parameter für Fehlerberichterstattung in der nicht-werfenden Überladung

Rückgabewert

(keine)

Exceptions

The overload that does not take an error_code & parameter throws filesystem_error on underlying OS API errors, constructed with from as the first argument, zu as the second argument, and the OS error code as the error code argument. std:: bad_alloc may be thrown if memory allocation fails. The overload taking an error_code & parameter sets it to the OS API error code if an OS API call fails, and executes ec. clear ( ) if no errors occur. This overload has
noexcept Spezifikation:
noexcept

Siehe auch

kopiert Dateien oder Verzeichnisse
(Funktion)
kopiert Dateiinhalte
(Funktion)
erstellt eine symbolische Verknüpfung
(Funktion)
ermittelt das Ziel einer symbolischen Verknüpfung
(Funktion)