summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2022-02-08 19:02:06 +0000
committerChristopher Ng <chrng8@gmail.com>2022-02-11 23:34:25 +0000
commit21f9e85e1a2ae6c57ec34c8f4c202250caa68337 (patch)
treedd3174dbf5c0d6c9beb5775deb876ff3e0a0eb09 /lib/public
parente3244361bada8bc79384f49e127a9a310f05ae89 (diff)
downloadnextcloud-server-21f9e85e1a2ae6c57ec34c8f4c202250caa68337.tar.gz
nextcloud-server-21f9e85e1a2ae6c57ec34c8f4c202250caa68337.zip
Extend export destination interface
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/UserMigration/IExportDestination.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/public/UserMigration/IExportDestination.php b/lib/public/UserMigration/IExportDestination.php
index 0e4b121628e..5446e8d57f2 100644
--- a/lib/public/UserMigration/IExportDestination.php
+++ b/lib/public/UserMigration/IExportDestination.php
@@ -38,11 +38,22 @@ interface IExportDestination {
*
* @param string $path Full path to the file in the export archive. Parent directories will be created if needed.
* @param string $content The full content of the file.
- * @return bool whether the file was successfully added.
+ * @return bool whether the file contents were successfully added.
*
* @since 24.0.0
*/
- public function addFile(string $path, string $content): bool;
+ public function addFileContents(string $path, string $content): bool;
+
+ /**
+ * Adds a file to the export as a stream
+ *
+ * @param string $path Full path to the file in the export archive. Parent directories will be created if needed.
+ * @param resource $stream A stream resource to read from to get the file content.
+ * @return bool whether the file stream was successfully added.
+ *
+ * @since 24.0.0
+ */
+ public function addFileAsStream(string $path, $stream): bool;
/**
* Copy a folder to the export