std::experi...copy_symlink(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

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. πŸ¦‹

  1. Effectively calls f(read_symlink(from), to) where f is create_symlink() or create_directory_symlink depending on whether from resolves to a file or directory.
  2. Effectively calls f(read_symlink(from, ec), to, ec) where f is create_symlink() or create_directory_symlink depending on whether from resolves to a file or directory.

🌸 Parameters 🌸

  • from β€” path to a symbolic link to copy
  • to β€” destination path of the new symlink
  • ec β€” 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 link
  • create_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