summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2014-11-19 14:52:26 +0100
committerTor Andersson <tor@ccxvii.net>2014-12-03 01:33:00 +0100
commite1e83141b57624c2ff3089ff09fe8d99a70473e9 (patch)
tree60b24d5d1787ae772929eeaffc98d8786fd2205b /include
parent209544dea2f2e0b627a8b27a212681c1e9b8b7fc (diff)
downloadmupdf-e1e83141b57624c2ff3089ff09fe8d99a70473e9.tar.xz
Add convenience fz_read_file function.
Read the contents of a file into a fz_buffer in one go.
Diffstat (limited to 'include')
-rw-r--r--include/mupdf/fitz/stream.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/mupdf/fitz/stream.h b/include/mupdf/fitz/stream.h
index f7eb6f16..fb3ef932 100644
--- a/include/mupdf/fitz/stream.h
+++ b/include/mupdf/fitz/stream.h
@@ -142,6 +142,11 @@ int fz_read(fz_stream *stm, unsigned char *data, int len);
*/
fz_buffer *fz_read_all(fz_stream *stm, int initial);
+/*
+ fz_read_file: Read all the contents of a file into a buffer.
+*/
+fz_buffer *fz_read_file(fz_context *ctx, const char *filename);
+
enum
{
FZ_STREAM_META_PROGRESSIVE = 1,