异步文件读写

读文件

  1. use AsyncFile;
  2. $content = (yield AsyncFile::read(__ROOT__."runtime/test.txt"));

写文件

  1. $res = (yield AsyncFile::write(__ROOT__."runtime/test.txt", "hello wordls!"));
  2. $res = (yield AsyncFile::write(__ROOT__."runtime/test.txt", "hello wordls!", FILE_APPEND));

目前仅支持小于4M的文件