aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/SimpleFS/NewSimpleFile.php
Commit message (Collapse)AuthorAgeFilesLines
* chore: Add SPDX headerAndy Scherzinger2024-05-241-20/+2
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* Fix return type of methods returning false on errorCôme Chilliet2023-04-031-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Type sizes as int|float throughout the code baseCôme Chilliet2023-02-071-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Handle possible null value for file in OC\Files\SimpleFS\NewSimpleFileThomas Citharel2022-12-031-0/+4
| | | | Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* Fix typos in lib/private subdirectoryluz paz2022-07-271-1/+1
| | | | | | Found via `codespell -q 3 -S l10n -L jus ./lib/private` Signed-off-by: luz paz <luzpaz@github.com>
* Add typing to SimpleFSCarl Schwan2022-07-141-24/+12
| | | | | | - Fix putContent sometimes return a bool and sometimes nothing Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Extend simple file with extension getterChristopher Ng2022-03-041-0/+11
| | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-2/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Update license headersChristoph Wurst2020-12-301-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Bump icewind/streams from 0.7.1 to 0.7.2Christoph Wurst2020-12-291-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-2/+7
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* allow writing content directly when creating new SimpleFileRobin Appelman2020-02-281-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Create SimpleFile only when writing the contentRobin Appelman2020-02-281-0/+221
instead of first creating an empty file and then writing the content. This solves the overhead of creating an empty file with the common pattern: ```php $file = $simpleFilder->newFile('foo.txt'); $file->putContent('bar.txt'); ``` roughly halving the number of storage and database operations that need to be done when creating a `SimpleFile`. This is not automatically done with `File` because that has a more complex api which I'm more hesitant to touch. Instead the `Folder::newFile` api has been extended to accept the content for the new file. In my local testing, the overhead of first creating an empty file took about 20% of the time for preview generation Signed-off-by: Robin Appelman <robin@icewind.nl>