aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/SimpleFS
Commit message (Collapse)AuthorAgeFilesLines
* chore: Add SPDX headerAndy Scherzinger2024-05-243-62/+6
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-1/+1
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Fix return type of methods returning false on errorCôme Chilliet2023-04-032-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Type sizes as int|float throughout the code baseCôme Chilliet2023-02-072-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* composer run cs:fixCôme Chilliet2023-01-201-1/+0
| | | | 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>
* Scope the appdata theming storage for global and usersJohn Molakvoæ2022-10-141-0/+15
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* Fix typos in lib/private subdirectoryluz paz2022-07-272-2/+2
| | | | | | 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-143-60/+31
| | | | | | - 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-042-0/+18
| | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-043-6/+3
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Add getID function to the simplefile implementationRoeland Jago Douma2021-03-081-0/+4
| | | | | | Sometimes it is useful to get the actual fileid Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* 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 license headers for 19Christoph Wurst2020-04-292-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-102-3/+2
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-312-2/+8
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* allow writing content directly when creating new SimpleFileRobin Appelman2020-02-282-4/+9
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Create SimpleFile only when writing the contentRobin Appelman2020-02-282-3/+223
| | | | | | | | | | | | | | | | | | | | 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>
* Update license headersChristoph Wurst2019-12-052-2/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-222-0/+2
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Harden appdata putcontentRoeland Jago Douma2019-04-081-2/+11
| | | | | | | If for whatever reason appdata got into a strange state this will at least propegate up and not make it do boom the next run. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Separate fopen into read and write methodsJulius Härtl2018-07-111-3/+15
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add fopen method to ISimpleFileJulius Härtl2018-07-111-0/+11
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add resource type phpDoc for putContent methodsJulius Härtl2018-06-261-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Hardening of SimpleFile getContentRoeland Jago Douma2018-02-271-1/+35
| | | | | | | if file_get_contents fails remove the file. And traverse up the tree checking if the other folders are there. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* avatar to appdataRoeland Jago Douma2016-10-051-0/+4
| | | | | | * Fix AvatarTest Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add TestsRoeland Jago Douma2016-10-051-2/+13
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Initial AppDataRoeland Jago Douma2016-10-052-0/+187
* Introduce simpleFS * Introduce IAppData * Introduce AppData Factory to get your AppData folder * Update FileDisplayResponse * AppData implements a ISimpleRoot but lazy. So only if an apps starts to access data will stuff get initialized Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>