Closed xtrime-ru closed 1 year ago
touch() in in Eio driver don't create file if it is absent.
I ve added php \touch() to check, that file can be created.
Im using php8.2.5 with ev and eio-3.0.0RC4
<?php require __DIR__ . '/vendor/autoload.php'; \touch('some_file_sync.txt'); \Amp\File\touch('some_file_async.txt'); \Revolt\EventLoop::run();
Fatal error: Uncaught Amp\File\FilesystemException: No such file or directory in /app-host-link/vendor/amphp/file/src/Driver/EioFilesystemDriver.php:426 Stack trace: #0 [internal function]: Amp\File\Driver\EioFilesystemDriver->onGenericResult(Object(Amp\DeferredFuture), -1, Resource id #71) #1 /app-host-link/vendor/amphp/file/src/Internal/EioPoll.php(28): eio_poll() #2 /app-host-link/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(569): Amp\File\Internal\EioPoll::Amp\File\Internal\{closure}('a', Resource id #54) #3 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}() #4 /app-host-link/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(479): Fiber->start() #5 /app-host-link/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(533): Revolt\EventLoop\Internal\AbstractDriver->invokeCallbacks() #6 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}() #7 /app-host-link/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(86): Fiber->start() #8 /app-host-link/vendor/revolt/event-loop/src/EventLoop/Internal/DriverSuspension.php(97): Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}() #9 /app-host-link/vendor/amphp/amp/src/Future.php(251): Revolt\EventLoop\Internal\DriverSuspension->suspend() #10 /app-host-link/vendor/amphp/file/src/Driver/EioFilesystemDriver.php(323): Amp\Future->await() #11 /app-host-link/vendor/amphp/file/src/Driver/StatusCachingFilesystemDriver.php(144): Amp\File\Driver\EioFilesystemDriver->touch('/app-host-link/...', 1682506529, 1682506529) #12 /app-host-link/vendor/amphp/file/src/Filesystem.php(308): Amp\File\Driver\StatusCachingFilesystemDriver->touch('/app-host-link/...', NULL, NULL) #13 /app-host-link/vendor/amphp/file/src/functions.php(295): Amp\File\Filesystem->touch('/app-host-link/...', NULL, NULL) #14 /app-host-link/test.php(6): Amp\File\touch('/app-host-link/...') #15 {main} thrown in /app-host-link/vendor/amphp/file/src/Driver/EioFilesystemDriver.php on line 426 Process finished with exit code 255
Thanks for reporting!
touch() in in Eio driver don't create file if it is absent.
I ve added php \touch() to check, that file can be created.
Im using php8.2.5 with ev and eio-3.0.0RC4