PipeConduit

Conduit for pipes.

Each PipeConduit can only read or write, depending on the way it has been created.

Destructor

~this
~this()

Destructor.

Members

Aliases

close
alias close = Device.close
Undocumented in source.
copy
alias copy = Device.copy
Undocumented in source.
error
alias error = Device.error
Undocumented in source.
fileHandle
alias fileHandle = Device.fileHandle
Undocumented in source.
read
alias read = Device.read
Undocumented in source.
write
alias write = Device.write
Undocumented in source.

Functions

bufferSize
size_t bufferSize()

Returns the buffer size for the PipeConduit.

read
uint read(void[] dst)

Read a chunk of bytes from the file into the provided array (typically that belonging to an IBuffer)

toString
immutable(char)[] toString()

Returns the name of the device.

write
uint write(const(void)[] src)

Write a chunk of bytes to the file from the provided array (typically that belonging to an IBuffer).

Inherited Members

From Device

error
alias error = Conduit.error

expose superclass definition also

error
void error()

Throw an IOException noting the last error.

toString
immutable(char)[] toString()

Return the name of this device.

bufferSize
size_t bufferSize()

Return a preferred size for buffering conduit I/O.

IO
struct IO

Windows-specific code.

io
IO io;

Windows-specific code.

reopen
void reopen(Handle handle)

Allow adjustment of standard IO handles.

fileHandle
Handle fileHandle [@property getter]

Return the underlying OS handle of this Conduit.

dispose
void dispose()
detach
void detach()

Release the underlying file. Note that an exception is not thrown on error, as doing so can induce some spaggetti into error handling. Instead, we need to change this to return a bool instead, so the caller can decide what to do.

read
size_t read(void[] dst)

Read a chunk of bytes from the file into the provided array. Returns the number of bytes read, or Eof where there is no further data.

write
size_t write(const(void)[] src)

Write a chunk of bytes to the file from the provided array. Returns the number of bytes written, or Eof if the output is no longer available.

wait
size_t wait(scheduler.Type type, uint bytes, uint timeout)
handle
int handle;

Unix-specific code.

reopen
void reopen(Handle handle)

Allow adjustment of standard IO handles.

fileHandle
Handle fileHandle [@property getter]

Return the underlying OS handle of this Conduit.

detach
void detach()

Release the underlying file.

read
size_t read(void[] dst)

Read a chunk of bytes from the file into the provided array. Returns the number of bytes read, or Eof where there is no further data.

write
size_t write(const(void)[] src)

Write a chunk of bytes to the file from the provided array. Returns the number of bytes written, or Eof if the output is no longer available.

Meta