}
#endif // _di_fl_file_read_fifo_
+#ifndef _di_fl_file_write_
+ f_return_status fl_file_write(f_file file, const f_dynamic_string buffer) {
+ if (file.file == 0) return f_file_not_open;
+
+ f_status status = f_status_initialize;
+ f_size_t size = 0;
+
+ size = fwrite(buffer.string, file.byte_size, buffer.used, file.file);
+
+ if (size <= buffer.used * file.byte_size) {
+ return f_file_write_error;
+ }
+
+ return f_none;
+ }
+#endif // _di_fl_file_write_
+
+#ifndef _di_fl_file_write_partial_
+ f_return_status fl_file_write_partial(f_file file, const f_dynamic_string buffer, const f_string_location position) {
+ #ifndef _di_level_1_parameter_checking_
+ if (position.start < position.stop) return f_invalid_parameter;
+ #endif // _di_level_1_parameter_checking_
+
+ if (file.file == 0) return f_file_not_open;
+
+ f_status status = f_status_initialize;
+ f_size_t size = 0;
+
+ f_string_length total = buffer.used - (position.stop - position.start + 1);
+
+ size = fwrite(buffer.string + position.start, file.byte_size, total, file.file);
+
+ if (size <= total * file.byte_size) {
+ return f_file_write_error;
+ }
+
+ return f_none;
+ }
+#endif // _di_fl_file_write_partial_
+
#ifdef __cplusplus
} // extern "C"
#endif
extern f_return_status fl_file_read_fifo(f_file file, f_dynamic_string *buffer);
#endif // _di_fl_file_read_fifo_
+#ifndef _di_fl_file_write_
+ extern f_return_status fl_file_write(f_file file, const f_dynamic_string buffer);
+#endif // _di_fl_file_write_
+
+#ifndef _di_fl_file_write_partial_
+ extern f_return_status fl_file_write_partial(f_file file, const f_dynamic_string buffer, const f_string_location position);
+#endif // _di_fl_file_write_partial_
+
#ifdef __cplusplus
} // extern "C"
#endif