aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/View.php
Commit message (Collapse)AuthorAgeFilesLines
* Refactors "strpos" calls in lib/private to improve code readability.Faraz Samapoor2023-05-151-2/+2
| | | | Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
* Merge pull request #37943 from nextcloud/fix/fix-getcontent-return-typeArthur Schiwon2023-05-031-1/+1
|\ | | | | Fix file_get_content signatures to make it clear it can return false
| * Fix file_get_content signatures to make it clear it can return falseCôme Chilliet2023-04-271-1/+1
| | | | | | | | | | | | | | In File::getContent, which must return a string, throw an Exception instead of returning false. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Normalize logical operatorsGit'Fellow2023-05-021-13/+13
|/ | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* Remove unecessary fully qualified namespaces from phpdocCôme Chilliet2023-04-051-4/+4
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* View needs to return an instance of OC\Files\FileInfo explicitelyCôme Chilliet2023-04-031-5/+2
| | | | | | | | Applications are calling methods from the class which are not from the public interface, and which cannot be added easily to public interface because Node interface extends FileInfo. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* More type cleanup in View and FileInfoCôme Chilliet2023-04-031-77/+68
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix return type of methods returning false on errorCôme Chilliet2023-04-031-4/+4
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Remove unused method getLocalFolderCôme Chilliet2023-04-031-14/+0
| | | | | | It’s not used and not in any OCP interface/class. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Tidy up typing in OC\Files\ViewCôme Chilliet2023-04-031-80/+51
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Use proper path for quota fetchingJulius Härtl2023-03-061-2/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* only fetch the data for mounts inside a folder when neededRobin Appelman2023-02-091-5/+12
| | | | | | | | for most operations we don't actually care about any mounts inside a folder, only for metadata that needs to propagate across storage boundaries (size, etag, mtime) do we need all the submount info. By only loading this data when needed we can save a bunch of storage setup in a number of cases Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix psalm errorsCôme Chilliet2023-02-071-2/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Strong type filesize related methods to ease 32bits problem findingsCôme Chilliet2023-02-071-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* composer run cs:fixCôme Chilliet2023-01-201-4/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Update cache when file size === 0Louis Chemineau2022-11-231-3/+3
| | | | | | | | The conditions were false when $result === 0. $results here contains the number of written bits. The correct way of checking for operation success is to check if $result === false Signed-off-by: Louis Chemineau <louis@chmn.me>
* Rename file1 and file2 to source and target in Storage abstractionCarl Schwan2022-10-181-63/+63
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Merge pull request #33566 from nextcloud/fopen-not-found-rescanblizzz2022-10-011-1/+11
|\ | | | | trigger a rescan when trying to fopen a file that exists in cache but not on disk
| * trigger a rescan when trying to fopen a file that exists in cache but not on ↵Robin Appelman2022-09-291-1/+11
| | | | | | | | | | | | disk Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Cleanup tags and Share componentCarl Schwan2022-09-291-2/+4
|/ | | | | | | | | - Port to LoggerInterface - Use IDBConnection and IQueryBuilder instead of raw SQL and OC_DB - Use IEventListener instead of hooks - Remove the now unused OC_DB and OC_DB_StatementWrapper legacy utils Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Merge branch 'master' into display-name-cache-publicCarl Schwan2022-08-151-2/+2
|\ | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
| * Fix typos in lib/private subdirectoryluz paz2022-07-271-2/+2
| | | | | | | | | | | | Found via `codespell -q 3 -S l10n -L jus ./lib/private` Signed-off-by: luz paz <luzpaz@github.com>
* | expose displayname cache trough a public interfaceRobin Appelman2022-05-181-6/+1
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Migrate more classes of lib/private to LoggerInterfaceCôme Chilliet2022-04-261-16/+14
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #32082 from nextcloud/directory-content-lazy-ownerVincent Petry2022-04-251-8/+8
|\ | | | | use a lazy user for the file owner when listing a directory
| * Use a lazy user for the file owner when listing a directoryRobin Appelman2022-04-221-8/+8
| | | | | | | | | | | | | | Only getUID and getDisplayName are called on the file owner objects anyway and we can get this information often without DB request Signed-off-by: Robin Appelman <robin@icewind.nl>
* | optimize adding submount info to directory contentRobin Appelman2022-04-221-4/+2
|/ | | | | | no need to loop when we can do a hashtable lookup Signed-off-by: Robin Appelman <robin@icewind.nl>
* shRobin Appelman2022-04-061-12/+12
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* allow reusing known folder info when getting directory contentsRobin Appelman2022-04-061-7/+14
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* composer run cs:fixCôme Chilliet2022-04-051-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Exit early if $storage is falsy in View::getDirectoryContentCôme Chilliet2022-04-051-96/+94
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix incorrect if conditions in ViewCôme Chilliet2022-04-051-3/+3
| | | | | | | | | | ($something->getPermissions() && Constants::PERMISSION_READ) does not make sense as PERMISSION_READ contant is 1 this will always evaluate to true. getPersmissions is returning an int which is a bitwise combination as documented in the interface, so it should be used with bit operators. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Add dav plugin to trigger recalculating of checksumsRobin Appelman2022-03-311-0/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* type fixesRobin Appelman2022-03-041-12/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* move teardown logic to SetupManagerRobin Appelman2022-03-041-3/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #29866 from nextcloud/isset-sizeVincent Petry2022-01-171-1/+1
|\ | | | | Check if size value is set
| * Typoacsfer2021-11-241-1/+1
| |
| * Check if size value is setacsfer2021-11-231-1/+1
| | | | | | | | Using `isset()` as it does not return true for array keys that correspond to a `null` value, while `array_key_exists()` does. Fix #29865
* | Check style updateCarl Schwan2022-01-131-1/+1
| | | | | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | Fix a few psalm issues and moved back to psalm/phar 4.18Carl Schwan2022-01-121-1/+1
|/ | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix psalmJohn Molakvoæ2021-11-041-2/+2
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* Revert "add dav plugin to trigger recalculating of checksums"John Molakvoæ2021-11-011-3/+2
|
* Add dav plugin to trigger recalculating of checksumsRobin Appelman2021-08-231-2/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #26494 from rigrig/fix-php8-deprecationsMorris Jobke2021-06-071-2/+6
|\ | | | | Fix some php 8 warnings
| * Check whether output buffering is active before turning it offRichard de Boer2021-05-291-2/+6
| | | | | | | | | | | | | | Before we just turned it off and @suppressed the error if ob was not active. In PHP 8 this error is no longer suppressed, so try to not cause it at all. Signed-off-by: Richard de Boer <git@tubul.net>
* | Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+0
|/ | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Drop \OCP\UserChristoph Wurst2021-05-211-1/+1
| | | | | | Inlines and remaining usages and drops the deprecated public API. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* reuse usermanager instance when processing search resultsRobin Appelman2021-03-101-2/+3
| | | | | | saves some time when processing large search results Signed-off-by: Robin Appelman <robin@icewind.nl>
* Properly end iterating over the file once the target has been reachedJulius Härtl2021-02-261-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>