On Monday, 28 September 2015 at 11:41:37 UTC, Gary Willoughby wrote:
Article:
http://nomad.so/2015/09/working-with-files-in-the-d-programming-language/

Reddit link:
https://www.reddit.com/r/programming/comments/3mosw7/working_with_files_in_the_d_programming_language/

A little criticism:
   write(file, read(file, size));
truncate by reading/writing is not good sample at least for official docs. It is not efficient. You can use POSIX truncate or _chsize Windows system calls for truncation to specific length. For zero it is simpler: open("file", "w+");

std.outbuffer;
In Java world you can write OutputStream out = new BufferedOutputStream(new FileOutputStream(fileName), BUF_SIZE);
It is not clear how to combine OutBuffer and write in such way.

Reply via email to