aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/storage/stream_interface.php')
-rw-r--r--phpBB/phpbb/storage/stream_interface.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/phpBB/phpbb/storage/stream_interface.php b/phpBB/phpbb/storage/stream_interface.php
new file mode 100644
index 0000000000..6d0af71550
--- /dev/null
+++ b/phpBB/phpbb/storage/stream_interface.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ *
+ * This file is part of the phpBB Forum Software package.
+ *
+ * @copyright (c) phpBB Limited <https://www.phpbb.com>
+ * @license GNU General Public License, version 2 (GPL-2.0)
+ *
+ * For full copyright and license information, please see
+ * the docs/CREDITS.txt file.
+ *
+ */
+
+namespace phpbb\storage;
+
+interface stream_interface
+{
+ /**
+ * Reads a file as a stream
+ *
+ * @param string $path File to read
+ *
+ * @throws \phpbb\storage\exception\exception When unable to open file
+ *
+ * @return resource Returns a file pointer
+ */
+ public function read_stream($path);
+
+ /**
+ * Writes a new file using a stream
+ *
+ * @param string $path The target file
+ * @param resource $resource The resource
+ *
+ * @throws \phpbb\storage\exception\exception When target file exists
+ * When target file cannot be created
+ */
+ public function write_stream($path, $resource);
+}