string representing file path.
a fuction called when operation finished or an error occurred.
import std.file : write, remove; import dpromise.utils : runEventloop; write("hoge.txt", "hogehogepiyopiyo"); scope(exit) remove("hoge.txt"); readTextAsyncWithCallback!string("hoge.txt", (s, e) nothrow { assert(e is null); assert(s == "hogehogepiyopiyo"); }); runEventloop();
Read file path with asynchronous IO then calls the callback function with data as string(validate with std.utf.validate).
If an error occurred, the callback function will be called with the error.