mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Extend export destination interface
Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
parent
e3244361ba
commit
21f9e85e1a
1 changed files with 13 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue