append - too many files

Joel joelcnz at gmail.com
Wed Jan 11 02:15:13 UTC 2023


I get this error after a while (seems append doesn't close the 
file each time):
std.file.FileException at std/file.d(836): history.txt: Too many 
open files

```d
auto jm_addToHistory(T...)(T args) {
	import std.conv : text;
	import std.file : append;

	auto txt = text(args);
	append("history.txt", txt);

	return txt;
}
```



More information about the Digitalmars-d-learn mailing list