www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Writing large data to file

reply Domain <dont_email empty.com> writes:
I am writing a split-liked tool, and want to write some large 
data (>4GB) to a single file. But this is not possible while 
using std.file.write, at least on windows. And I need dig into 
the source code to find out the reason (Windows API WriteFile 
uses DWORD as the input size). So why not call WriteFile multiple 
times inside write function, or at least return the number of 
bytes has been written, than I can append the left myself.
Jan 10
parent reply =?UTF-8?Q?Ali_=c3=87ehreli?= <acehreli yahoo.com> writes:
On 01/10/2016 06:43 PM, Domain wrote:
 I am writing a split-liked tool, and want to write some large data
 (>4GB) to a single file. But this is not possible while using
 std.file.write, at least on windows. And I need dig into the source code
 to find out the reason (Windows API WriteFile uses DWORD as the input
 size). So why not call WriteFile multiple times inside write function,
 or at least return the number of bytes has been written, than I can
 append the left myself.
Have you tried std.stdio.File? write or rawWrite should work: http://dlang.org/phobos/std_stdio.html#.File Ali
Jan 11
parent Domain <dont_email empty.com> writes:
On Tuesday, 12 January 2016 at 07:15:33 UTC, Ali Çehreli wrote:
 On 01/10/2016 06:43 PM, Domain wrote:
 I am writing a split-liked tool, and want to write some large 
 data
 (>4GB) to a single file. But this is not possible while using
 std.file.write, at least on windows. And I need dig into the 
 source code
 to find out the reason (Windows API WriteFile uses DWORD as 
 the input
 size). So why not call WriteFile multiple times inside write 
 function,
 or at least return the number of bytes has been written, than 
 I can
 append the left myself.
Have you tried std.stdio.File? write or rawWrite should work: http://dlang.org/phobos/std_stdio.html#.File Ali
I know that. But I want to see an improvement in std.file.write, or at least the doc of it.
Jan 11