[Issue 3417] New: std.stdio.File needs size
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Oct 18 13:10:00 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3417
Summary: std.stdio.File needs size
Product: D
Version: 2.035
Platform: Other
OS/Version: Windows
Status: NEW
Severity: enhancement
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: dsimcha at yahoo.com
--- Comment #0 from David Simcha <dsimcha at yahoo.com> 2009-10-18 13:09:58 PDT ---
the std.stdio.File struct should have a way of getting the file size. If the
file is a standard stream or something, some convention like returning -1 could
be used. This would be trivial to implement (though I'm not saying this is
necessarily the best or most efficient way) by using something like:
try {
std.file.getSize(this.name);
} catch(FileException) { // A stream that isn't a "real" file.
return -1;
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list