istream.h revision 07e4875d250e7a7157cd99132aafc773cf3cdf83
unsigned int seekable:
1;
/* we can seek() backwards */ unsigned int eof:
1;
/* read() has reached to end of file (but may still be data available in buffer) */ /* Reference counting. References start from 1, so calling i_stream_unref() destroys the stream if i_stream_ref() is never used. */ /* Return file descriptor for stream, or -1 if none is available. */ /* Mark the stream closed. Any reads after this will return -1. The data already read can still be used. */ /* Sync the stream with the underlying backend, ie. if a file has been modified, flush any cached data. */ /* Change the maximum size for stream's input buffer to grow. Useful only for buffered streams (currently only file). */ /* Returns number of bytes read if read was ok, -1 if EOF or error, -2 if the /* Skip forward a number of bytes. Never fails, the next read tells if it /* Seek to specified position from beginning of file. Never fails, the next read tells if it was successful. This works only for files. */ /* Returns struct stat, or NULL if error. As the underlying stream may not be a file, only some of the fields might be set, others would be zero. st_size is always set, and if it's not known, it's -1. */ /* Returns TRUE if there are any bytes left to be read or in buffer. */ /* Gets the next line from stream and returns it, or NULL if more data is needed to make a full line. */ /* Like i_stream_next_line(), but reads for more data if needed. Returns NULL if more data is needed or error occured. */ /* Returns pointer to beginning of read data, or NULL if there's no data /* Like i_stream_get_data(), but returns non-const data. This only works with buffered streams (currently only file), others return NULL. */ /* Like i_stream_get_data(), but read more when needed. Returns 1 if more than threshold bytes are available, 0 if less, -1 if error or EOF with no bytes read that weren't already in buffer, or -2 if stream's input buffer