digitalmars.D - Large file support?
- Jose Quinteiro <jquinteiro keibiinc.com> Apr 19 2007
- Dan <murpsoft hotmail.com> Apr 19 2007
- Jose Quinteiro <jquinteiro keibiinc.com> Apr 19 2007
- Pragma <ericanderton yahoo.removeme.com> Apr 19 2007
- Jose Quinteiro <jquinteiro keibiinc.com> Apr 19 2007
- BCS <BCS pathlink.com> Apr 19 2007
- Jose Quinteiro <jquinteiro keibiinc.com> Apr 20 2007
- Dan <murpsoft hotmail.com> Apr 20 2007
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.
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:Have you tried using MmFileStream? Seems to me that, or BufferedFile, would be the way to go.
whatever opening a 6GB file. Never heard of MmFileStream, is there doc for it somewhere? Thanks, Jose.
http://www.digitalmars.com/d/phobos/std_stream.html at the bottom
Apr 19 2007
BCS wrote:http://www.digitalmars.com/d/phobos/std_stream.html at the bottom
I 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









Jose Quinteiro <jquinteiro keibiinc.com> 