| 854 | } |
| 855 | |
| 856 | BOOST_FILESYSTEM_DECL |
| 857 | void copy(const path& from, const path& to, system::error_code* ec) |
| 858 | { |
| 859 | file_status s(symlink_status(from, *ec)); |
| 860 | if (ec != 0 && *ec) return; |
| 861 | |
| 862 | if(is_symlink(s)) |
| 863 | { |
| 864 | copy_symlink(from, to, *ec); |
| 865 | } |
| 866 | else if(is_directory(s)) |
| 867 | { |
| 868 | copy_directory(from, to, *ec); |
| 869 | } |
| 870 | else if(is_regular_file(s)) |
| 871 | { |
| 872 | copy_file(from, to, copy_option::fail_if_exists, *ec); |
| 873 | } |
| 874 | else |
| 875 | { |
| 876 | if (ec == 0) |
| 877 | BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::copy", |
| 878 | from, to, error_code(BOOST_ERROR_NOT_SUPPORTED, system_category()))); |
| 879 | ec->assign(BOOST_ERROR_NOT_SUPPORTED, system_category()); |
| 880 | } |
| 881 | } |
| 882 | |
| 883 | BOOST_FILESYSTEM_DECL |
| 884 | void copy_directory(const path& from, const path& to, system::error_code* ec) |
no test coverage detected