On lines 952-953 in phobos/stream.d, this function is used:
hFile = CreateFileA(toStringz(filename), access, share,
null, OPEN_EXISTING, 0, null);
This means that if you try to open a file that don't exist, it
crash gracefully with an error. This conflicts with the docs
that says:
"
class File : Stream
This subclass is for file system streams.
this()
this(char[] filename)
this(char[] filename, FileMode mode)
Create the stream with no open file, an open file in read and write mode, or
an open file with explicit file mode. mode, if given, is a combination of
FileMode.In (indicating a file that can be read) and FileMode.Out
(indicating a file that can be written). If the file does not exist, it is
created.
"
I therefore suggest this fix to the above lines of stream.d:
hFile = CreateFileA(toStringz(filename), access, share,
null, CREATE_ALWAYS, 0, null);
Lars Ivar Igesund

On lines 952-953 in phobos/stream.d, this function is used:
hFile = CreateFileA(toStringz(filename), access, share,
null, OPEN_EXISTING, 0, null);
This means that if you try to open a file that don't exist, it
crash gracefully with an error. This conflicts with the docs
that says:
"
class File : Stream
This subclass is for file system streams.
this()
this(char[] filename)
this(char[] filename, FileMode mode)
Create the stream with no open file, an open file in read and write mode,

or

an open file with explicit file mode. mode, if given, is a combination of
FileMode.In (indicating a file that can be read) and FileMode.Out
(indicating a file that can be written). If the file does not exist, it is
created.
"
I therefore suggest this fix to the above lines of stream.d:
hFile = CreateFileA(toStringz(filename), access, share,
null, CREATE_ALWAYS, 0, null);
Lars Ivar Igesund

On lines 952-953 in phobos/stream.d, this function is used:
hFile = CreateFileA(toStringz(filename), access, share,
null, OPEN_EXISTING, 0, null);
This means that if you try to open a file that don't exist, it
crash gracefully with an error. This conflicts with the docs
that says:
"
class File : Stream
This subclass is for file system streams.
this()
this(char[] filename)
this(char[] filename, FileMode mode)
Create the stream with no open file, an open file in read and write

mode,

or

an open file with explicit file mode. mode, if given, is a combination

of

FileMode.In (indicating a file that can be read) and FileMode.Out
(indicating a file that can be written). If the file does not exist, it