Skip to content

Latest commit

 

History

History
23 lines (12 loc) · 382 Bytes

yi-bu-wen-jian-du-xie.md

File metadata and controls

23 lines (12 loc) · 382 Bytes

异步文件读写

读文件

    use AsyncFile;

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

写文件

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

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

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