| 74 | } |
| 75 | |
| 76 | void try_exists() |
| 77 | { |
| 78 | cout << "\nexists(" << p << ") "; |
| 79 | try |
| 80 | { |
| 81 | bool result = exists(p); |
| 82 | cout << "is " << (result ? "true" : "false") << "\n"; |
| 83 | } |
| 84 | catch (const filesystem_error& ex) |
| 85 | { |
| 86 | cout << "throws a filesystem_error exception: " << ex.what() << "\n"; |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | } // namespace |
| 91 |