 st8b7c:f320:99b9:690f:4595:cd17:293a:c069filesystem8b7c:f320:99b9:690f:4595:cd17:293a:c069opy_symlink    Defined in header <filesystem>         void copy_symlink( const st8b7c:f320:99b9:690f:4595:cd17:293a:c069filesystem8b7c:f320:99b9:690f:4595:cd17:293a:c069path& from,
                   const st8b7c:f320:99b9:690f:4595:cd17:293a:c069filesystem8b7c:f320:99b9:690f:4595:cd17:293a:c069path& to);
  (1)   (since C++17)     void copy_symlink( const st8b7c:f320:99b9:690f:4595:cd17:293a:c069filesystem8b7c:f320:99b9:690f:4595:cd17:293a:c069path& from,
                   const st8b7c:f320:99b9:690f:4595:cd17:293a:c069filesystem8b7c:f320:99b9:690f:4595:cd17:293a:c069path& to,
                   st8b7c:f320:99b9:690f:4595:cd17:293a:c069error_code& ec ) noexcept;
  (2)   (since C++17)    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).
 Exceptions The overload that does not take a st8b7c:f320:99b9:690f:4595:cd17:293a:c069error_code& parameter throws filesystem8b7c:f320:99b9:690f:4595:cd17:293a:c069ilesystem_error on underlying OS API errors, constructed with from as the first path argument, to as the second path argument, and the OS error code as the error code argument. The overload taking a st8b7c:f320:99b9:690f:4595:cd17:293a:c069error_code& parameter sets it to the OS API error code if an OS API call fails, and executes ec.clear() if no errors occur. Any overload not marked noexcept may throw st8b7c:f320:99b9:690f:4595:cd17:293a:c069bad_alloc if memory allocation fails.
 See also     copy
(C++17)   copies files or directories  (function) 
    copy_file
(C++17)   copies file contents  (function) 
    create_symlinkcreate_directory_symlink
(C++17)(C++17)   creates a symbolic link  (function) 
    read_symlink
(C++17)   obtains the target of a symbolic link  (function) 
  

    
{'path': 'public/docs/cpp/filesystem/copy_symlink.html', 'source': 'DevDocs.IO'}