aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2021-12-29 16:36:15 +0100
committerJay Berkenbilt <ejb@ql.org>2021-12-29 19:41:02 +0100
commitaf91b5b5841aaa34ebf2d2062041c874425f474f (patch)
treee8d34f402e67cf532fbfa775c4be31e68366b77c /include
parentac0060ac38ecf4fa380f49fd1e40ebaabb479596 (diff)
downloadqpdf-af91b5b5841aaa34ebf2d2062041c874425f474f.tar.zst
Add QUtil::file_can_be_opened
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QUtil.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/qpdf/QUtil.hh b/include/qpdf/QUtil.hh
index dd42fe1c..5a064d5c 100644
--- a/include/qpdf/QUtil.hh
+++ b/include/qpdf/QUtil.hh
@@ -111,6 +111,10 @@ namespace QUtil
QPDF_DLL
FILE* fopen_wrapper(std::string const&, FILE*);
+ // Attempt to open the file read only and then close again
+ QPDF_DLL
+ bool file_can_be_opened(char const* filename);
+
// Wrap around off_t versions of fseek and ftell if available
QPDF_DLL
int seek(FILE* stream, qpdf_offset_t offset, int whence);