Commit graph

46 commits

Author SHA1 Message Date
93bce47220 dont throw errors on double close in stream wrapper 2021-03-12 16:48:22 +01:00
2346caf394 add error cases to type hints 2021-03-02 19:44:41 +01:00
32b65b0bad type fixes 2021-03-02 19:34:10 +01:00
fdc0e3f113 formatting 2021-03-02 19:34:10 +01:00
f1d138eddd fix file name casing 2020-04-08 16:54:30 +02:00
6c91d3e390 add stream wrapper to calculate hash on write 2019-03-12 10:42:36 +01:00
Roeland Jago Douma
9d525ccb1e
fixup! Fix new loader
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-03-11 22:49:15 +01:00
Roeland Jago Douma
8a1095e46c
fixup! Fix new loader
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-03-11 22:46:04 +01:00
Roeland Jago Douma
afe2b5753e
Only load protocol if not speified
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-03-11 22:39:52 +01:00
Roeland Jago Douma
064d01292a
Fix new loader
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-03-11 22:39:35 +01:00
Roeland Jago Douma
550e84e1cc
Added a simple hash wrapper
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-03-11 22:31:35 +01:00
a91efa8520 minor cleanup 2019-03-11 17:35:23 +01:00
782e09ec62 some extra type checks 2019-03-11 17:23:14 +01:00
2c8ae56d02 cleanup context handling for wrappers 2019-03-11 16:52:13 +01:00
3171a535de autodetect class and protocol 2019-03-11 15:36:15 +01:00
Roeland Jago Douma
8c45c9a43b
Pass the strlen to the readCallback as was expected
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-02-15 13:52:13 +01:00
Roeland Jago Douma
3c98a7556b
Add a preClose callback
This is useful in case a callback wants to do something with the stream
right before it gets closed.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-02-14 16:30:54 +01:00
Roeland Jago Douma
0bc7fe4cb1
Fix read in callbackwrapper
The number of read bytes is not the same as the number of bytes
requested to read.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-02-14 15:28:47 +01:00
0a78597117 use better method to determine when a stream is a directory stream 2018-04-24 11:07:38 +02:00
03ad0180b4 Add CountWrapper 2018-01-30 15:09:12 +01:00
Vincent Petry
668abfee80
Prevent duplicate closeCallback calls in case of GC ghosts
Sometimes PHP 7 GC decides to call stream_close again even after the
PHP request has ended, and even if fclose was called before already.
2016-12-02 14:57:57 +01:00
0700f81441 fix a problem with UrlCallBack 2016-10-26 22:16:07 +02:00
5981b1b39c add PathWrapper to get a virtual path for an existing file 2016-10-26 22:08:04 +02:00
Robin Appelman
d3620e8dc4 Fix retrywrapper when the wrapped stream fails to write or read completely 2016-06-02 16:37:52 +02:00
Robin Appelman
af7f329db7 Add test for retry wrapper 2016-03-17 13:30:32 +01:00
Robin Appelman
96b787d793 Add retry stream wrapper 2016-03-17 13:30:28 +01:00
Robin Appelman
f8cbccabd5 fix 5.3 compatiblity of tests 2015-10-16 16:01:06 +02:00
Robin Appelman
2e2fe951e9 static::class is only since 5.5 :( 2015-10-16 15:51:11 +02:00
Robin Appelman
f47297b76a Add directory filter 2015-10-16 15:51:11 +02:00
Robin Appelman
91176a6bf5 add directory wrapper base 2015-10-16 15:51:11 +02:00
Robin Appelman
d31237bc40 Add seekable wrapper to make non seekable streams seekable 2015-10-16 15:51:11 +02:00
Robin Appelman
4eb39ce82e test with more php versions 2015-04-25 16:14:03 +02:00
Robin Appelman
f3b397f504 Fix recursive mkdir 2014-08-27 16:03:35 +02:00
Robin Appelman
b9bba79250 Check if callable when we actually try to call it 2014-08-27 15:52:10 +02:00
Robin Appelman
e5854bfd06 Add UrlCallBack wrapper that provides callbacks for fopen, unlink, rename, etc 2014-08-27 15:42:43 +02:00
Robin Appelman
53cfe7f4f1 Add directory support to wrappers 2014-08-27 15:42:40 +02:00
Robin Appelman
7bde877610 We create the context ourselves 2014-08-27 12:21:32 +02:00
Robin Appelman
a96e4754f7 No need to check if isset since we're creating the context ourselves 2014-08-27 12:20:26 +02:00
Robin Appelman
5aae45f2dd We already the checks earlier 2014-07-31 01:46:15 +02:00
Robin Appelman
99ecfc5287 Better cleanup of registered streams 2014-07-31 01:06:38 +02:00
Robin Appelman
214a31bc98 Add IteratorDirectory to create directory handles from iterators and arrays 2014-07-31 00:36:48 +02:00
Robin Appelman
b876cef7f2 Add interfaces for File and Directory wrappers 2014-07-30 23:51:55 +02:00
Robin Appelman
fd996aea9c Fix case 2014-07-24 01:44:48 +02:00
Robin Appelman
a19beaf7ef Add Wrapper::wrap() convenience method
also fix some test class names
2014-07-24 01:07:35 +02:00
Robin Appelman
acb8b69108 call callbacks after running the stream operation 2014-07-24 00:45:45 +02:00
Robin Appelman
d54615fd3a initial version 2014-07-23 23:02:10 +02:00