diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-02-28 16:07:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-28 16:07:02 +0100 |
commit | de34786303291adc09034442e97d4a76e6a453d1 (patch) | |
tree | 822d31f3870d8507e5981ccd2225e7c1d73a003c /lib/public | |
parent | 0f08acfe3169e3ef0c332353324271bd86c2e525 (diff) | |
parent | 245125d81b60eb29a6923878dd49c0fa0497321a (diff) | |
download | nextcloud-server-de34786303291adc09034442e97d4a76e6a453d1.tar.gz nextcloud-server-de34786303291adc09034442e97d4a76e6a453d1.zip |
Merge pull request #19493 from nextcloud/simplefile-new-lazy
Create SimpleFile only when writing the content
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/Files/Folder.php | 3 | ||||
-rw-r--r-- | lib/public/Files/SimpleFS/ISimpleFolder.php | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/public/Files/Folder.php b/lib/public/Files/Folder.php index 99d331850cf..a78a9ca8f78 100644 --- a/lib/public/Files/Folder.php +++ b/lib/public/Files/Folder.php @@ -109,11 +109,12 @@ 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 * @return \OCP\Files\File * @throws \OCP\Files\NotPermittedException * @since 6.0.0 */ - public function newFile($path); + public function newFile($path, $content = null); /** * search for files with the name matching $query 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 |