From af91b5b5841aaa34ebf2d2062041c874425f474f Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Wed, 29 Dec 2021 10:36:15 -0500 Subject: Add QUtil::file_can_be_opened --- include/qpdf/QUtil.hh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') 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); -- cgit v1.2.3-54-g00ecf