Skip to content

Commit 0c3de78

Browse files
committed
:octocat: +stream mode constants
1 parent 8a240b1 commit 0c3de78

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/StreamUtil.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
*/
1818
class StreamUtil{
1919

20+
public const MODES_READ_WRITE = ['a+', 'c+', 'c+b', 'c+t', 'r+' , 'r+b', 'r+t', 'w+' , 'w+b', 'w+t', 'x+' , 'x+b', 'x+t'];
21+
public const MODES_READ = [...self::MODES_READ_WRITE, 'r', 'rb', 'rt'];
22+
public const MODES_WRITE = [...self::MODES_READ_WRITE, 'a', 'rw', 'w', 'wb'];
23+
2024
/**
2125
* Reads the content from a stream and make sure we rewind
2226
*/

0 commit comments

Comments
 (0)