The OpenD Programming Language

File.this

Constructor taking the name of the file to open and the open mode.

Copying one File object to another results in the two File objects referring to the same underlying file.

The destructor automatically closes the file as soon as no File object refers to it anymore.

  1. this(string name, const(char)[] stdioOpenmode)
    struct File
    @safe
    this
    (
    string name
    ,
    scope const(char)[] stdioOpenmode = "rb"
    )
  2. this(R1 name)
  3. this(R1 name, R2 mode)

Parameters

name string

range or string representing the file name

stdioOpenmode const(char)[]

range or string represting the open mode (with the same semantics as in the C standard library $(CSTDIO fopen) function)

Throws

ErrnoException if the file could not be opened.

Meta