Checks the permissions of the output file to ensure it is writeable.
| 33 | |
| 34 | // Checks the permissions of the output file to ensure it is writeable. |
| 35 | void CheckOutputFilePermissions(const Arg<string>& output_file) { |
| 36 | QCHECK(output_file.specified()) << "Missing required flag --output_file.\n"; |
| 37 | QCHECK(port::file::Writable(output_file.value()).ok()) |
| 38 | << "Specified output_file is not writable: " << output_file.value() |
| 39 | << ".\n"; |
| 40 | } |
| 41 | |
| 42 | // Checks the permissions of the frozen model file. |
| 43 | void CheckFrozenModelPermissions(const Arg<string>& input_file) { |