Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | /** |
3 | * |
4 | * This file is part of the phpBB Forum Software package. |
5 | * |
6 | * @copyright (c) phpBB Limited <https://www.phpbb.com> |
7 | * @license GNU General Public License, version 2 (GPL-2.0) |
8 | * |
9 | * For full copyright and license information, please see |
10 | * the docs/CREDITS.txt file. |
11 | * |
12 | */ |
13 | |
14 | namespace phpbb\storage; |
15 | |
16 | use phpbb\storage\exception\storage_exception; |
17 | |
18 | interface stream_interface |
19 | { |
20 | /** |
21 | * Reads a file as a stream |
22 | * |
23 | * @param string $path File to read |
24 | * |
25 | * @return resource Returns a file pointer |
26 | * @throws storage_exception When unable to open file |
27 | */ |
28 | public function read_stream(string $path); |
29 | |
30 | /** |
31 | * Writes a new file using a stream |
32 | * |
33 | * @param string $path The target file |
34 | * @param resource $resource The resource |
35 | * |
36 | * @return void |
37 | * @throws storage_exception When target file exists |
38 | * When target file cannot be created |
39 | */ |
40 | public function write_stream(string $path, $resource): void; |
41 | } |