51
51
my_b_copy_to_file(IO_CACHE *cache, FILE *file)
56
55
/* Reinit the cache to read from the beginning of the cache */
57
56
if (reinit_io_cache(cache, READ_CACHE, 0L, false, false))
59
58
bytes_in_cache= my_b_bytes_in_cache(cache);
62
61
if (my_fwrite(file, cache->read_pos, bytes_in_cache,
63
62
MYF(MY_WME | MY_NABP)) == (size_t) -1)
65
64
cache->read_pos= cache->read_end;
66
65
} while ((bytes_in_cache= my_b_fill(cache)));