Re: Writing large data to file
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.
Re: Writing large data to file
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
Writing large data to file
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.