digitalmars.D - Large file support?
- Jose Quinteiro (4/4) Apr 19 2007 I could not find any way to open large files using D/Phobos streams. I
- Dan (2/7) Apr 19 2007 I'm not sure, but I think it's presently defined as size_t; which is ali...
- Jose Quinteiro (2/4) Apr 19 2007 It refused to open the file at all with a "File too large" error.
- Pragma (5/7) Apr 19 2007 Have you tried using MmFileStream? Seems to me that, or BufferedFile, w...
- Jose Quinteiro (6/10) Apr 19 2007 BufferedFile is what I was using. It gave me "File too large" or
- BCS (3/15) Apr 19 2007 http://www.digitalmars.com/d/phobos/std_stream.html
- Jose Quinteiro (3/6) Apr 20 2007 I had never noticed that. And I was using SliceStream, too. I'm
- Dan (4/6) Apr 20 2007 Don't be. You should see how many times I've made mistakes on these for...
I could not find any way to open large files using D/Phobos streams. I wound up writing a little C turdlet to handle this. Since Phobos calls the C library, I think adding support for this could be as simple as compiling dmd with _FILE_OFFSET_BITS defined to 64.
Apr 19 2007
Jose Quinteiro Wrote:I could not find any way to open large files using D/Phobos streams. I wound up writing a little C turdlet to handle this. Since Phobos calls the C library, I think adding support for this could be as simple as compiling dmd with _FILE_OFFSET_BITS defined to 64.I'm not sure, but I think it's presently defined as size_t; which is aliased to either long or int depending on the system. I don't think they used uint or ulong...
Apr 19 2007
Dan wrote:I'm not sure, but I think it's presently defined as size_t; which is aliased to either long or int depending on the system. I don't think they used uint or ulong...It refused to open the file at all with a "File too large" error.
Apr 19 2007
Jose Quinteiro wrote:I could not find any way to open large files using D/Phobos streams. I wound up writing a little C turdlet to handle this.Have you tried using MmFileStream? Seems to me that, or BufferedFile, would be the way to go. FWIW, Tango has some rather sophisticated file-IO that is up to the task for big files as well. -- - EricAnderton at yahoo
Apr 19 2007
Pragma wrote:Have you tried using MmFileStream? Seems to me that, or BufferedFile, would be the way to go.BufferedFile is what I was using. It gave me "File too large" or whatever opening a 6GB file. Never heard of MmFileStream, is there doc for it somewhere? Thanks, Jose.
Apr 19 2007
Jose Quinteiro wrote:Pragma wrote:http://www.digitalmars.com/d/phobos/std_stream.html at the bottomHave you tried using MmFileStream? Seems to me that, or BufferedFile, would be the way to go.BufferedFile is what I was using. It gave me "File too large" or whatever opening a 6GB file. Never heard of MmFileStream, is there doc for it somewhere? Thanks, Jose.
Apr 19 2007
BCS wrote:http://www.digitalmars.com/d/phobos/std_stream.html at the bottomI had never noticed that. And I was using SliceStream, too. I'm embarrassed.
Apr 20 2007
Jose Quinteiro Wrote:I had never noticed that. And I was using SliceStream, too. I'm embarrassed.Don't be. You should see how many times I've made mistakes on these forums this month. People are probably remembering me by name so they can ignore my posts... : p Best of luck then.
Apr 20 2007