| 80 | } |
| 81 | |
| 82 | void try_exists() |
| 83 | { |
| 84 | cout << "\nexists(" << p << ") "; |
| 85 | try |
| 86 | { |
| 87 | bool result = exists(p); |
| 88 | cout << "is " << (result ? "true" : "false") << "\n"; |
| 89 | } |
| 90 | catch (const filesystem_error& ex) |
| 91 | { |
| 92 | cout << "throws a filesystem_error exception: " << ex.what() << "\n"; |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | } |
| 97 |