| 15 | #include <exception> |
| 16 | |
| 17 | int main(int argc, char* argv[]) |
| 18 | { |
| 19 | boost::filesystem::path::default_name_check(boost::filesystem::native); |
| 20 | if (argc != 3) |
| 21 | { |
| 22 | std::cout << "Usage: equivalent path1 path2\n"; |
| 23 | return 2; |
| 24 | } |
| 25 | |
| 26 | bool eq; |
| 27 | try |
| 28 | { |
| 29 | eq = boost::filesystem::equivalent(argv[1], argv[2]); |
| 30 | } |
| 31 | catch (const std::exception& ex) |
| 32 | { |
| 33 | std::cout << ex.what() << "\n"; |
| 34 | return 3; |
| 35 | } |
| 36 | |
| 37 | std::cout << (eq ? "Paths are equivalent\n" : "Paths are not equivalent\n"); |
| 38 | return !eq; |
| 39 | } |
nothing calls this directly
no test coverage detected