string representing file path.
A promise of string read.
1 import std.file : write, remove; 2 import dpromise.utils : runEventloop; 3 4 write("hoge.txt", "hogehogepiyopiyo"); 5 scope(exit) remove("hoge.txt"); 6 7 readTextAsync("hoge.txt").then( 8 (s) { 9 assert(s == "hogehogepiyopiyo"); 10 } 11 ); 12 13 runEventloop();
Read file path with asynchronous IO and return data read as a promise of string(validate with std.utf.validate)
If an error occurred, the promise will be rejected.