summaryrefslogtreecommitdiffstats
path: root/lib/private/Files
Commit message (Collapse)AuthorAgeFilesLines
* Remove trailing and in between spacesChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove spaces after method or function callChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-095-6/+6
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-097-4/+3
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Try to use the display name of file transfersJoas Schilling2020-04-081-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #20033 from nextcloud/s3-seekable-streamRoeland Jago Douma2020-04-062-21/+206
|\ | | | | Enable fseek for files in S3 storage
| * update autoloaderRobin Appelman2020-04-031-9/+7
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * add basic tests for s3 seeking and add some error handling if reopen return ↵Robin Appelman2020-04-011-8/+18
| | | | | | | | | | | | the wrong range Signed-off-by: Robin Appelman <robin@icewind.nl>
| * make seekable s3 stream genericRobin Appelman2020-04-012-57/+106
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * Enable fseek for files in S3 storageLukas Stabe2020-04-012-19/+147
| | | | | | | | Signed-off-by: Lukas Stabe <lukas@stabe.de>
* | Properly hint exceptions thrown by getUserFolderJulius Härtl2020-04-031-2/+4
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | restart transaction when cache insert fails due to duplicateRobin Appelman2020-04-011-3/+7
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | call cache->insert directly instead of going trough cache->put first when ↵Robin Appelman2020-04-011-1/+1
| | | | | | | | | | | | scanning Signed-off-by: Robin Appelman <robin@icewind.nl>
* | dont try to get existing cache data during scanning if we already know its a ↵Robin Appelman2020-04-011-4/+4
| | | | | | | | | | | | new file Signed-off-by: Robin Appelman <robin@icewind.nl>
* | reuse known parentId when inserting cache entries in scannerRobin Appelman2020-04-012-1/+4
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | optimize getMetaData for local storageRobin Appelman2020-04-011-6/+57
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-3131-3/+36
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #20170 from nextcloud/techdebt/remove-unused-importsChristoph Wurst2020-03-272-2/+0
|\ | | | | Remove unused imports
| * Remove unused importsChristoph Wurst2020-03-252-2/+0
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Use the short array syntax, everywhereChristoph Wurst2020-03-2630-139/+139
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Use lowercase true, false and null constantsChristoph Wurst2020-03-251-1/+1
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #19782 from nextcloud/quota-wrapper-include-externalRoeland Jago Douma2020-03-241-9/+18
|\ | | | | Use global used space in quota wrappen when external storage is included
| * Use global used space in quota wrappen when external storage is includedRobin Appelman2020-03-041-9/+18
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Actually check if the owner is not nullRoeland Jago Douma2020-03-161-0/+5
| | | | | | | | | | | | | | Else this can error out on storages that do not have an owner (e.g. groupfolders). Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Get correct mimetype on objectstoresRoeland Jago Douma2020-03-111-6/+1
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Merge pull request #19746 from nextcloud/locked-exception-forward-existingRoeland Jago Douma2020-03-091-4/+7
|\ \ | | | | | | pass the existing locks info when making locked exception with absolu…
| * | pass the existing locks info when making locked exception with absolute pathsRobin Appelman2020-03-021-4/+7
| |/ | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* / dont try to update storage mtime if we can't get the mtimeRobin Appelman2020-03-021-6/+9
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* 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-285-7/+233
| | | | | | | | | | | | | | | | | | | | 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/+8
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Don't create invalid usersJoas Schilling2020-02-121-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update license headers for 18Christoph Wurst2019-12-203-0/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add typed events for the filesystem/scannerChristoph Wurst2019-12-131-21/+35
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #18236 from ↵Roeland Jago Douma2019-12-121-60/+90
|\ | | | | | | | | nextcloud/bugfix/noid/always-detect-mimetype-by-content-in-workflows Allow to detect mimetype by content
| * Fix detection of non extention typesRoeland Jago Douma2019-12-121-3/+6
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
| * Try more methodsJoas Schilling2019-12-101-3/+12
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * Some more fixes in detecting the mimetype from the contentJoas Schilling2019-12-101-15/+17
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * Cleanup the codeJoas Schilling2019-12-101-43/+45
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * Allow to check for the mimetype by content onlyJoas Schilling2019-12-101-7/+21
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Merge pull request #18314 from nextcloud/fixFileIdSearchRoeland Jago Douma2019-12-101-0/+2
|\ \ | |/ |/| Fix ambigious fileID on search
| * fix https://github.com/nextcloud/server/issues/18313tobiasKaminsky2019-12-101-0/+2
| | | | | | | | Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
* | Fix search limit to homeRoeland Jago Douma2019-12-091-0/+4
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Move custom definition logic into methodDaniel Kesselberg2019-12-091-21/+16
| | | | | | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* | Ensure that we don't merge broken json.Daniel Kesselberg2019-12-091-6/+25
| | | | | | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* | Update license headersChristoph Wurst2019-12-0590-101/+218
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Merge pull request #17941 from nextcloud/search-by-ownerRoeland Jago Douma2019-12-054-19/+48
|\ \ | |/ |/| Allow filtering the search results to the users home storage
| * remove old 'owner' filterRobin Appelman2019-12-031-5/+0
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * Allow filtering the search results to the users home storageRobin Appelman2019-12-034-19/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done by adding a ```xml <d:eq> <d:prop> <oc:owner-id/> </d:prop> <d:literal>$userId</d:literal> </d:eq> ``` clause to the search query. Searching by `owner-id` can only be done with the current user id and the comparison can not be inside a `<d:not>` or `<d:or>` statement Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #18163 from nextcloud/fix_file_sizeRoeland Jago Douma2019-12-041-1/+3
|\ \ | | | | | | fix filename size