aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/View.php
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #46672 from nextcloud/fix/preview-invalid-idAndy Scherzinger2024-07-251-3/+4
|\ | | | | Avoid using partial file info as valid one
| * fix: Do not return partial file info if we have a cache entryJulius Härtl2024-07-221-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-221-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>
* refactor: Migrate some legacy and core functions to `IFilenameValidator`Ferdinand Thiessen2024-07-191-0/+6
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* refactor: Migrate filename validation logic from `Storage` to ↵Ferdinand Thiessen2024-07-161-2/+6
| | | | | | `FilenameValidator` Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* Merge pull request #45014 from nextcloud/forbid-moving-subfolderRobin Appelman2024-05-271-0/+6
|\ | | | | fix: forbid moving a folder into a subfolder of itself
| * fix: forbid moving a folder into a subfolder of itselfRobin Appelman2024-05-171-0/+6
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | chore: Add SPDX headerAndy Scherzinger2024-05-241-43/+4
|/ | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix: Avoid updating size when calling touch on a fileJulius Härtl2024-05-081-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-021-4/+4
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: ensure nested mount points are handled in the correct orderRobin Appelman2024-03-181-0/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Refactor `OC\Server::getLockingProvider`Andrew Summers2024-03-151-1/+1
| | | | Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
* fix: update "move into share" check to share managerRobin Appelman2024-02-271-24/+29
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* chore: Replace OC::$server->getL10N by OCP\Util::getL10N in lib and some appsCôme Chilliet2024-02-051-5/+5
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* perf: Avoid updating the folder size if we know the size differenceJulius Härtl2024-01-121-3/+5
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* 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>