[Issue 2670] New: std.file.read() should read files of 0 length
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Feb 16 01:50:30 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2670
Summary: std.file.read() should read files of 0 length
Product: D
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: bugzilla at digitalmars.com
Some files, such as:
char[] thing = cast(char[])std.file.read("/proc/sys/kernel/osrelease");
stat as having 0 size, and so thing[] comes back with 0 length. But if the file
is read anyway with C's read(), there is data in it.
--
More information about the Digitalmars-d-bugs
mailing list