aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/View.php
Commit message (Collapse)AuthorAgeFilesLines
* fix(files): Create non-existent parents of mountpointsprovokateurin2024-09-041-0/+9
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix: Do not return partial file info if we have a cache entryJulius Härtl2024-07-251-3/+4
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* fix: FileInfo from `View` should have the correct name of a mountpointFerdinand Thiessen2024-07-241-0/+4
| | | | | | | | | | If a mountpoint is returned from a `View` the name must match the view scoped name and not the global name. For example group folders have a name like `1` or `2` (the ID), but the name of the FileInfo returned fro mthe View should be the mount point name, like `First groupfolder` or similar. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* Fix backportGit'Fellow2024-05-281-0/+5
| | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* fix: forbid moving a folder into a subfolder of itselfRobin Appelman2024-05-271-0/+1
| | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl> [skip ci]
* perf: Avoid updating the folder size if we know the size differenceJulius Härtl2024-04-051-3/+5
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* fix: ensure nested mount points are handled in the correct orderRobin Appelman2024-03-181-0/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-2/+2
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* reuse sharing disabled state when listing folder contentRobin Appelman2023-10-191-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Detect aborted connection in OC\Files\View and stop writing data to the ↵Benjamin Gaussorgues2023-09-071-2/+12
| | | | | | output buffer Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* fix: don't emit Hooks when hookpaths are emptyAnna Larch2023-08-171-16/+24
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* 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>