StreamFile

A #GMimeStream wrapper around standard-c FILE pointers.

Constructors

this
this(void* ptr, Flag!"Take" take)
this
this(void* fp)

Creates a new #GMimeStreamFile object around fp.

Members

Functions

getOwner
bool getOwner()

Gets whether or not stream owns the backend FILE pointer.

self
StreamFile self()

Returns this, for use in with statements.

setOwner
void setOwner(bool owner)

Sets whether or not stream owns the backend FILE pointer.

Properties

_gType
GType _gType [@property getter]

Static functions

_getGType
GType _getGType()
builder
StreamFileGidBuilder builder()

Get builder for gmime.stream_file.StreamFile

newWithBounds
gmime.stream_file.StreamFile newWithBounds(void* fp, long start, long end)

Creates a new #GMimeStreamFile object around fp with bounds start and end.

open
gmime.stream.Stream open(string path, string mode)

Creates a new #GMimeStreamFile object for the specified path.

Inherited Members

From Stream

_getGType
GType _getGType()
_gType
GType _gType [@property getter]
self
Stream self()

Returns this, for use in with statements.

builder
StreamGidBuilder builder()

Get builder for gmime.stream.Stream

bufferGets
ptrdiff_t bufferGets(ubyte[] buf)

Reads in at most one less than max characters from stream and stores them into the buffer pointed to by buf. Reading stops after an EOS or newline ('\n'). If a newline is read, it is stored into the buffer. A '\0' is stored after the last character in the buffer.

bufferReadln
void bufferReadln(ubyte[] buffer)

Reads a single line into buffer.

close
int close()

Closes the stream.

construct
void construct(long start, long end)

Initializes a new stream with bounds start and end.

eos
bool eos()

Tests the end-of-stream indicator for stream.

flush
int flush()

Sync's the stream to disk.

length
long length()

Gets the length of the stream.

read
ptrdiff_t read(ubyte[] buf)

Attempts to read up to len bytes from stream into buf.

reset
int reset()

Resets the stream.

seek
long seek(long offset, gmime.types.SeekWhence whence)

Repositions the offset of the stream stream to the argument offset according to the directive whence as follows:

setBounds
void setBounds(long start, long end)

Set the bounds on a stream.

substream
gmime.stream.Stream substream(long start, long end)

Creates a new substream of stream with bounds start and end.

tell
long tell()

Gets the current offset within the stream.

write
ptrdiff_t write(ubyte[] buf)

Attempts to write up to len bytes of buf to stream.

writeString
ptrdiff_t writeString(string str)

Writes string to stream.

writeToStream
long writeToStream(gmime.stream.Stream dest)

Attempts to write the source stream to the destination stream.

writev
long writev(gmime.types.StreamIOVector[] vector)

Writes at most count blocks described by vector to stream.