32 #ifndef _QORE_FILEINPUTSTREAM_H 33 #define _QORE_FILEINPUTSTREAM_H 36 #include "qore/InputStream.h" 52 return "FileInputStream";
57 return f.
read(ptr, limit, timeout, xsink);
72 DLLLOCAL
QoreFile& getFile() {
return f; }
74 DLLLOCAL
int64 getTimeout()
const {
return timeout; }
81 #endif // _QORE_FILEINPUTSTREAM_H
DLLEXPORT qore_size_t setPos(qore_size_t pos)
sets the absolute file position to "pos"
size_t qore_size_t
used for sizes (same range as a pointer)
Definition: common.h:73
Qore's string value type, reference counted, dynamically-allocated only.
Definition: QoreStringNode.h:50
DLLEXPORT const char * getBuffer() const
returns the string's buffer; this data should not be changed
provides controlled access to file data through Qore data structures
Definition: QoreFile.h:66
DLLEXPORT QoreStringNode * read(qore_offset_t size, ExceptionSink *xsink)
reads string data from the file and returns the string read (caller owns the reference count returned...
DLLEXPORT qore_size_t getPos()
returns the absolute byte position in the file
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:46
long long int64
64bit integer type, cannot use int64_t here since it breaks the API on some 64-bit systems due to equ...
Definition: common.h:260
DLLEXPORT int open2(ExceptionSink *xsink, const char *fn, int flags=O_RDONLY, int mode=0777, const QoreEncoding *cs=QCS_DEFAULT)
opens the file and raises a Qore-language exception if an error occurs