| 4086 | #endif |
| 4087 | |
| 4088 | PUGI__FN bool save_file_impl( |
| 4089 | const xml_document& doc, |
| 4090 | FILE* file, |
| 4091 | const char_t* indent, |
| 4092 | unsigned int flags, |
| 4093 | xml_encoding encoding) |
| 4094 | { |
| 4095 | if (!file) |
| 4096 | return false; |
| 4097 | |
| 4098 | xml_writer_file writer(file); |
| 4099 | doc.save(writer, indent, flags, encoding); |
| 4100 | |
| 4101 | int result = ferror(file); |
| 4102 | |
| 4103 | fclose(file); |
| 4104 | |
| 4105 | return result == 0; |
| 4106 | } |
| 4107 | PUGI__NS_END |
| 4108 | |
| 4109 | namespace pugi |