std::experi...copy_symlink(3)
π std::experimental::filesystem::copy_symlink π
okay bestie, this is the C++ Standard Libary manual page for std::experi...copy_symlink(3) β and yes, we are copying a symlink to another location. slay. β¨
π NAME π
std::experimental::filesystem::copy_symlinkβstd::experimental::filesystem::copy_symlink
β¨ Synopsis β¨
Defined in header <experimental/filesystem>
void copy_symlink( const path& from, const path& to ); (1)
(filesystem TS)
void copy_symlink( const path& from, const path& to, (2)
(filesystem TS)
error_code& ec );
Copies a symlink to another location. π¦
- Effectively calls
f(read_symlink(from), to)wherefiscreate_symlink()orcreate_directory_symlinkdepending on whetherfromresolves to a file or directory. - Effectively calls
f(read_symlink(from, ec), to, ec)wherefiscreate_symlink()orcreate_directory_symlinkdepending on whetherfromresolves to a file or directory.
πΈ Parameters πΈ
fromβ path to a symbolic link to copytoβ destination path of the new symlinkecβ out-parameter for error reporting in the non-throwing overload
π«Ά Return value π«Ά
(none) β like, no return value, bestie π
π 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, 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 specification:
noexcept
π See also π
copyβ copies files or directories (function)copy_fileβ copies file contents (function)create_symlinkβ creates a symbolic linkcreate_directory_symlinkβ (function)read_symlinkβ obtains the target of a symbolic link (function)
π¦ Categories: π¦
- Noindexed pages
- unconditionally noexcept
π Hidden categories: π
- Pages with unreviewed unconditional noexcept template
- Pages with unreviewed noexcept template
okay that's the whole vibe, bestie! source/version: http://cppreference.com Β· date: 2024.06.10 Β· page: std::experi...copy_symlink(3) β mwah πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms