Created
September 14, 2014 13:27
Revisions
-
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ <?php require 'vendor/autoload.php'; $loop = \React\EventLoop\Factory::create(); $filesystem = new \React\Filesystem\Filesystem($loop); $loop->addTimer(0.0001, function() use ($filesystem) { $file = $filesystem->file(__FILE__); $file->exists()->then(function() use ($file) { echo __FILE__ . ' exists', PHP_EOL; $file->size()->then(function($size) use ($file) { var_export($size); echo PHP_EOL; $file->time()->then(function($time) { var_export($time); echo PHP_EOL;g }); }); }); $rm = $filesystem->file('./test_rm'); $rm->exists()->then(function() use ($rm) { $rm->remove()->then(function() { echo 'test_rm removed', PHP_EOL; }, function() { echo 'test_rm note removed', PHP_EOL; }); }); }); $loop->run();