summaryrefslogtreecommitdiffstats
path: root/lib/public/Files
Commit message (Collapse)AuthorAgeFilesLines
* also use case sensitive like when searching in a folderRobin Appelman2021-12-141-0/+1
| | | | | | this case was missed from https://github.com/nextcloud/server/pull/29080 Signed-off-by: Robin Appelman <robin@icewind.nl>
* code checker fixes for instanceOfStorageRobin Appelman2021-12-023-2/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* teach psalm about `Storage::instanceOfStorage`Robin Appelman2021-12-021-0/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* handle ordering in folder searchRobin Appelman2021-03-231-0/+12
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* only require user to be set in a query that handles tagsRobin Appelman2021-03-231-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #26146 from nextcloud/backport/26013/stable21Morris Jobke2021-03-171-0/+11
|\ | | | | [stable21] Return the fileid from `copyFromCache` and use it instead of doing an extra query
| * add ICopyFromCache trait to expose existing implementationRobin Appelman2021-03-161-0/+11
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | catch notfound and forbidden exception in smb::getmetadataRobin Appelman2021-03-051-2/+2
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Make whole Template class finalJulius Härtl2021-01-281-10/+16
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Move TemplateProvider registration to boot context and make template type ↵Julius Härtl2021-01-282-8/+7
| | | | | | registration lazy Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Skip template picker if none availableJohn Molakvoæ (skjnldsv)2021-01-282-3/+20
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Add templatedirectory config value to let admins have their custom templates ↵Julius Härtl2021-01-282-2/+18
| | | | | | by default Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add ratio to template creatorsJulius Härtl2021-01-281-1/+29
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add template pickerJohn Molakvoæ (skjnldsv)2021-01-281-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* files: Create files from template APIJulius Härtl2021-01-285-0/+350
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update license headersChristoph Wurst2020-12-303-1/+7
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Bump icewind/streams from 0.7.1 to 0.7.2Christoph Wurst2020-12-293-28/+28
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #22916 from J0WI/unifiy-links-to-php.netRoeland Jago Douma2020-12-222-38/+38
|\ | | | | Unify links to php.net
| * Unify links to php.netJ0WI2020-09-172-38/+38
| | | | | | | | | | | | Update all links to https://www.php.net/ Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* | Merge pull request #24594 from kofemann/dcacheJulius Härtl2020-12-222-4/+4
|\ \
| * | storage: update IStorage#file_put_contents docs to match usageTigran Mkrtchyan2020-12-212-4/+4
| | | | | | | | | | | | | | | | | | | | | The current phpdoc of IStorage#file_put_contents doesnt corresponds to it's actual usage in code, e.g. Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
* | | Update all license headers for Nextcloud 21Christoph Wurst2020-12-168-7/+17
|/ / | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | code style and dispatchTypedRobin Appelman2020-12-022-2/+0
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | rename cache event to follow new naming standardsRobin Appelman2020-11-265-7/+75
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | extend cache eventsRobin Appelman2020-11-262-0/+40
| | | | | | | | | | | | | | | | - adds cache remove event - expose storage id in event - emit events during cache move Signed-off-by: Robin Appelman <robin@icewind.nl>
* | use in objectstore copyRobin Appelman2020-11-241-0/+8
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Remove deprecated INotifyStorage::listenMorris Jobke2020-10-281-18/+0
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | The file cache entry is array accessibleChristoph Wurst2020-10-131-1/+7
|/ | | | | | … so let's make this part of our API. We use it as array already. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Annotate that writeStream can throw a GenericFileExceptionJulius Härtl2020-09-101-0/+3
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update license headers for Nextcloud 20 (again)Christoph Wurst2020-09-071-0/+1
| | | | | | | There are still lots of outdated headers, so time for another round of updates. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Transfer shares of the transferred root nodeJulius Härtl2020-08-311-0/+7
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Merge pull request #22432 from nextcloud/enh/phpdocRoeland Jago Douma2020-08-2618-18/+0
|\ | | | | Add php docs build script
| * Remove @package annotations from public namespaceJulius Härtl2020-08-2617-17/+0
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
| * Remove wrongly annotated package namesJulius Härtl2020-08-261-1/+0
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Update the license headers for Nextcloud 20Christoph Wurst2020-08-2416-15/+31
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Properly add new methods to interface and document in PHPDoc for getRootMounts()Morris Jobke2020-08-172-1/+9
| | | | | | Introduced in #22063 and was just forgotten. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Distribute preview folders in appdata in multibucket setup to multiple bucketsMorris Jobke2020-08-061-0/+41
| | | | | | | | | * introduces a new IRootMountProvider to register mount points inside the root storage * adds a AppdataPreviewObjectStoreStorage to handle the split between preview folders and bucket number Ref #22033 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add lazy events for the Node APIRoeland Jago Douma2020-05-2815-0/+530
| | | | | | | | | | | Right now if you want to get events via the Node API you have to have a real instance of the Root. Which in turns sets up the whole FS. We should make sure this is done lazy. Else enabling the preview generator for example makes you setup the whole FS on each and every authenticated call. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headers for 19Christoph Wurst2020-04-2923-0/+23
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all constantsChristoph Wurst2020-04-1011-47/+47
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-1024-25/+17
| | | | | | | | | | | | | | | 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>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-095-1/+4
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Properly hint exceptions thrown by getUserFolderJulius Härtl2020-04-031-0/+4
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-313-0/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-261-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* allow writing content directly when creating new SimpleFileRobin Appelman2020-02-282-2/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Create SimpleFile only when writing the contentRobin Appelman2020-02-281-1/+2
| | | | | | | | | | | | | | | | | | | | 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>
* Allow to overwrite the path on the cache eventJoas Schilling2020-02-131-0/+6
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update license headers for 18Christoph Wurst2019-12-208-14/+22
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add typed events for the filesystem/scannerChristoph Wurst2019-12-137-0/+434
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>