1
0
mirror of https://github.com/danog/file.git synced 2024-11-26 11:54:54 +01:00
Commit Graph

114 Commits

Author SHA1 Message Date
388199d955 Merge branch 'master' of https://github.com/danog/file 2019-07-15 16:17:47 +02:00
Aaron Piotrowski
afa16cc0e1
Rename driver() to createDefaultDriver() 2019-05-30 10:16:32 -05:00
Aaron Piotrowski
654596edeb
Fix UV writing in append mode 2019-03-01 10:38:57 -06:00
Aaron Piotrowski
94c3bb631c
Avoid warning when writing an empty string with eio
No warning emitted from uv, but there's also no reason to call uv_fs_write().
2019-01-07 11:32:42 -06:00
1fb69a836a Do not use ternary operator when not needed 2018-12-24 13:51:42 +01:00
5a69fca406 Do not use the last error if it is null 2018-12-24 12:10:57 +01:00
Aaron Piotrowski
8cfe851cd2
Add truncate() to Handle
Addresses #32.
2018-10-28 23:55:11 -05:00
Aaron Piotrowski
25d8ef6e67
Sort file names in scandir() with eio
Matches behavior of other drivers.
2018-10-28 09:38:35 -05:00
Aaron Piotrowski
36de5ba892
Add isSupported() method 2018-10-28 09:36:23 -05:00
Aaron Piotrowski
04f047aec6
Fix scandir on empty directory in UvDriver 2018-10-27 11:35:33 -05:00
Aaron Piotrowski
76cdea9af7
Use shared style defintions; update styles 2018-10-27 10:57:31 -05:00
Andrew Mackrodt
4f54f94358 Return after failing deferred 2018-10-27 10:45:28 -05:00
Andrew Mackrodt
fa9534a038 Fixes EioDriver and UvDriver readlink implementation 2018-10-27 10:45:28 -05:00
Andrew Mackrodt
3e5da2b245 Fixes invalid stat result in UvDriver 2018-10-27 10:44:01 -05:00
Aaron Piotrowski
836e0ebb03
Update to amphp/parallel v1.0 2018-10-27 10:21:18 -05:00
Manuele Menozzi
7bb476921b Fix mkdir mode in Driver and implementations (#27) 2018-03-17 13:24:35 +01:00
Manuele Menozzi
ed5495f084 Fixes wrong mkdir default mode 2018-03-15 18:35:10 +01:00
Aaron Piotrowski
fb58fe8dd5
Update to amphp/parallel 0.2 2017-12-14 22:36:16 -06:00
eugene kirillov
b67c83752c Add optional time parameters to touch function (#22) 2017-11-22 20:55:30 -06:00
Aaron Piotrowski
9a375918ae
Reflect "e" flag changes and mode validation to BlockingDriver 2017-10-29 23:10:35 -05:00
Aaron Piotrowski
2f42596ac7
Remove potential duplicate "e" flag 2017-10-29 22:58:08 -05:00
Scott Pringle
271ad2bf4a
Additionally use "e" flag when opening files 2017-10-29 22:56:53 -05:00
Josh Di Fabio
007e084779 Remove redundant int cast 2017-10-03 11:42:39 +02:00
Niklas Keller
577bcc1f92 Use BlockingDriver in SAPIs like Apache or FPM 2017-07-21 08:32:23 +02:00
Aaron Piotrowski
169a1d1b36
Use StatCache in ParallelDriver 2017-07-18 01:01:20 -05:00
Aaron Piotrowski
28a62c8f5f
Clear stat cache before driver op 2017-07-18 00:42:01 -05:00
Aaron Piotrowski
0c45a5674e
Use BlockingDriver within parallel workers
Prevents infinite spawning of workers if ParallelDriver is used within a worker.
2017-07-17 23:10:17 -05:00
Aaron Piotrowski
5bac9ec725
Fix eof logic and remove seek tests for ParallelHandle 2017-07-06 16:51:20 -05:00
Bob Weinand
ddc3278313 Seeking should not set the ParallelHandle to busy 2017-07-06 13:46:23 +02:00
Aaron Piotrowski
edc6c097c2
Use blocking driver on Windows 2017-06-23 17:47:32 -05:00
Aaron Piotrowski
ad309f0cd2
Ignore errors when closing 2017-06-23 17:47:22 -05:00
Aaron Piotrowski
2ce32d57ff
Return same promise on subsequent close calls 2017-06-22 10:18:55 -05:00
Aaron Piotrowski
20261f7b77
Send only integer ID to worker 2017-06-22 10:16:33 -05:00
Niklas Keller
b7a54c1691 Don't store a loop reference in poll objects
Now we no longer have a circular reference there.
2017-06-21 22:35:08 +02:00
Niklas Keller
edb2ca52ce Remove unused import 2017-06-21 14:51:15 +02:00
Niklas Keller
d429dfc2aa Fix readlink phpdoc 2017-06-21 14:45:24 +02:00
Niklas Keller
8b43826073 Ignore double close 2017-06-21 14:07:49 +02:00
Niklas Keller
d2c1409bf4 Use StreamExceptions in Handle, make FilesystemException not extend StreamException 2017-06-21 13:51:59 +02:00
Niklas Keller
a13bb6f721 Use ClosedException as mandated by the ByteStream interfaces
This commit also changes end() to wait for the close() to finish before returning.
2017-06-21 11:01:19 +02:00
Niklas Keller
089684ea00 Require parallel 0.1.4 and fix code style 2017-06-21 10:18:14 +02:00
Niklas Keller
f2f21ef0c0 Refactor UvDriver and UvHandle to use UvPoll as busy watcher
Fixes #16.
2017-06-20 23:39:14 +02:00
Niklas Keller
6d2ca5e2b2 Fix EioPoll busy watcher
Previously we used listen() + done(). This API design is quite prone to
errors, as it's easy to miss a done() call in some branch. Additionally
this commit ensures that pending operations are always completed before
the EioPoll is completely destructed. Previously unfinished operations
leaked into new EioPoll instances.
2017-06-20 22:59:23 +02:00
Aaron Piotrowski
8cd21e4994
Fix EioPoll destruction
The callback was holding a reference to $this. Hopefully this fixes the watcher cancellation issues.
2017-06-20 13:41:53 -05:00
Niklas Keller
4cccc8d0f7 Ensure reads resolve to null on EOF, fixes #13 2017-06-20 18:25:37 +02:00
Niklas Keller
dd64670987 Make StatCache compatible with loop resets 2017-06-20 17:40:47 +02:00
Niklas Keller
587514b598 Reintroduce operation watching for UV and array_filter fix 2017-06-20 13:38:36 +02:00
Aaron Piotrowski
c98ea5ec42
Fix code style from merge 2017-06-20 00:31:58 -05:00
Aaron Piotrowski
9e7c1c1488
Forbid simultaneous conflicting ops
Signficantly refactored EioHandle and UvHandle.
2017-06-20 00:17:07 -05:00
Aaron Piotrowski
6113cfa453
Use object for eio polling 2017-06-20 00:14:11 -05:00
Niklas Keller
f21ff58272 Use counter to prevent race conditions in UvDriver
Fixes #16.
2017-06-18 21:03:44 +02:00