| 33 | } |
| 34 | |
| 35 | int |
| 36 | main(int argc, char **argv) |
| 37 | try { |
| 38 | if (argc != 2) { |
| 39 | fprintf(stderr, "Usage: WriteFile PATH\n"); |
| 40 | return EXIT_FAILURE; |
| 41 | } |
| 42 | |
| 43 | const FromNarrowPath path = argv[1]; |
| 44 | |
| 45 | FileOutputStream fos(path); |
| 46 | |
| 47 | if (!Copy(fos, STDIN_FILENO)) |
| 48 | return EXIT_FAILURE; |
| 49 | |
| 50 | fos.Commit(); |
| 51 | |
| 52 | return EXIT_SUCCESS; |
| 53 | } catch (...) { |
| 54 | PrintException(std::current_exception()); |
| 55 | return EXIT_FAILURE; |
| 56 | } |
nothing calls this directly
no test coverage detected