Namespaces
Variants

std::experimental::filesystem:: copy_symlink

From cppreference.net
ヘッダーで定義 <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)

シンボリックリンクを別の場所にコピーします。

1) 実質的に f ( read_symlink ( from ) , to ) を呼び出します。ここで f は、 from がファイルまたはディレクトリのどちらに解決されるかに応じて、 create_symlink ( ) または create_directory_symlink のいずれかとなります。
2) 実質的に f ( read_symlink ( from, ec ) , to, ec ) を呼び出します。ここで f は、 from がファイルまたはディレクトリのどちらに解決されるかに応じて、 create_symlink ( ) または create_directory_symlink のいずれかとなります。

目次

パラメータ

from - コピーするシンボリックリンクのパス
to - 新しいシンボリックリンクの保存先パス
ec - 例外を投げないオーバーロードでのエラー報告用出力パラメータ

戻り値

(なし)

例外

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, to 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 仕様:
noexcept

関連項目

ファイルまたはディレクトリをコピーする
(関数)
ファイル内容をコピーする
(関数)
シンボリックリンクを作成する
(関数)
シンボリックリンクのターゲットを取得する
(関数)