diff options
author | Robin Appelman <robin@icewind.nl> | 2020-02-18 18:02:58 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-02-28 12:55:22 +0100 |
commit | 63608ef461eef289cfc97d1eb5ff63aac3848bea (patch) | |
tree | 6035d752f555b9097a05e0a81a40a21529cd0c3f /lib/public | |
parent | 5ca1929e8cbc9beb32783a769e5a127527c1d93e (diff) | |
download | nextcloud-server-63608ef461eef289cfc97d1eb5ff63aac3848bea.tar.gz nextcloud-server-63608ef461eef289cfc97d1eb5ff63aac3848bea.zip |
allow writing content directly when creating new SimpleFile
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/Files/Folder.php | 2 | ||||
-rw-r--r-- | lib/public/Files/SimpleFS/ISimpleFolder.php | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/public/Files/Folder.php b/lib/public/Files/Folder.php index e7286ea028c..a78a9ca8f78 100644 --- a/lib/public/Files/Folder.php +++ b/lib/public/Files/Folder.php @@ -109,7 +109,7 @@ interface Folder extends Node { * Create a new file * * @param string $path relative path of the new file - * @param string | resource | null $content content for the new file, since 19.0.0 + * @param string|resource|null $content content for the new file, since 19.0.0 * @return \OCP\Files\File * @throws \OCP\Files\NotPermittedException * @since 6.0.0 diff --git a/lib/public/Files/SimpleFS/ISimpleFolder.php b/lib/public/Files/SimpleFS/ISimpleFolder.php index e3ef2bb48cd..22f8c90849b 100644 --- a/lib/public/Files/SimpleFS/ISimpleFolder.php +++ b/lib/public/Files/SimpleFS/ISimpleFolder.php @@ -64,11 +64,12 @@ interface ISimpleFolder { * Creates a new file with $name in the folder * * @param string $name + * @param string|resource|null $content @since 19.0.0 * @return ISimpleFile * @throws NotPermittedException * @since 11.0.0 */ - public function newFile($name); + public function newFile($name, $content = null); /** * Remove the folder and all the files in it |