FileStream.this

Wraps around an existing File.

Assertions: file must have a file already opened.

Notes: Unlike the other constructor, objects made from this constructor will only call dispose during the dtor if doDtor is set to DisposeOnDtor.yes.

This means, that if either this stream is disposed manually, or this object is collected/destroyed, then external copies of the file will also end up being closed. Which could possibly lead to confusion.

Also note that due to how this stream's isDispose works, if file is closed outside of this stream, then this stream will begin to throw StreamDisposedExceptions.

  1. this(Mode mode, char[] file)
  2. this(Mode mode, File file, DisposeOnDtor doDtor)
    class FileStream

Parameters

mode Mode

The FileStream.Mode to use. For this constructor, Open, Create, and Truncate have no effect.

file File

The File to wrap around.

doDtor DisposeOnDtor

See the Notes section.

Meta