[Issue 1725] New: std.stream.BufferedFile.create should use FileMode.OutNew
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Dec 11 13:40:00 PST 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1725
Summary: std.stream.BufferedFile.create should use
FileMode.OutNew
Product: D
Version: 2.008
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: bugzilla at digitalmars.com
ReportedBy: wbaxter at gmail.com
std.stream.BufferedFile.create uses FileMode.Out by default. This means that
if you have a big file pre-existing, call create("file") and then write just a
little bit to it, then you will still have a big file with just the initial few
bytes overwritten. This is almost certainly not what one wants or expect to
happen when they call a method named "BufferedFile.create()".
--
More information about the Digitalmars-d-bugs
mailing list