Joas Schilling
aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
7 months ago
Robin Appelman
dec880b285
optimize builtin storage wrappers
Signed-off-by: Robin Appelman <robin@icewind.nl>
8 months ago
Jonas
7441ce2b11
enh(IMountManager): Add method to get MountPoint from CachedMountInfo
Signed-off-by: Jonas <jonas@freesources.org>
9 months ago
Hamid Dehnavi
ea06cf2f39
Convert isset ternary to null coalescing operator
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
1 year ago
Robin Appelman
5685d68bd3
add more checks to ensure mounts aren't empty
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 year ago
Robin Appelman
fda820a64d
expose MovableMount in public interface
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 year ago
Faraz Samapoor
e7cc7653b8
Refactors "strpos" calls in lib/private to improve code readability.
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
1 year ago
Côme Chilliet
426c0341ff
Use typed version of IConfig::getSystemValue as much as possible
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Robin Appelman
9f3dbb699a
fix tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 year ago
Robin Appelman
e3bafcc7a8
cache numeric id in mountpoint
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 year ago
Robin Appelman
9281359fa4
deduplicate getStorage() logic in Mount\Manager
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 year ago
Robin Appelman
43589312cc
dont delegate Mount\Manager::getByNumericId to getByStorageId
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 year ago
Carl Schwan
d5c23dbb9f
Move CappedMemoryCache to OCP
This is an helpful helper that should be used in more place than just
server and this is already the case with groupfodlers, deck, user_oidc
and more using it, so let's make it public
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2 years ago
Daniel Kesselberg
f399fd41ec
Fix docblock for return type
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2 years ago
Côme Chilliet
069477e608
Migrate more classes of lib/private to LoggerInterface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Robin Appelman
8b12c75ca2
don't do a full setup for `findByStorageId`
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
99ac46d8f5
allow getting mounts by providers
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
19c64cf8b6
setup only relevant mounts when possible
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Côme Chilliet
6be7aa112f
Migrate from ILogger to LoggerInterface in lib/private
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Robin Appelman
917c74e214
type fixes
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
d81713e5c1
simplify setup of circular SetupManager<->Manager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
6c1d051ecd
add template annotations to CappedMemoryCache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
22875bf367
move logic to decide what to setup to setupmanager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
5c0fe93498
move teardown logic to SetupManager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
15ff65c12f
start moving filesystem setup logic to it's own place
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
7630d7a934
more type hints for ICachedMountInfo and IMountManager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Joas Schilling
88f4e972c5
Don't set up full filesystem to check for certificates
Signed-off-by: Joas Schilling <coding@schilljs.com>
2 years ago
Robin Appelman
8b7c8447a0
move root mount setup to mountproviders
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
cfb7923e08
store mountprovider for each mount in the mounts table
this enabled more fine grained filesystem setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
0217949715
only setup part of the filesystem for appdata requests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
John Molakvoæ
6ab2feaa54
Implement multibucket shift for ObjectStore
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2 years ago
Robin Appelman
8520717b4f
handle case where storage can't be created in getStorageRootId
Signed-off-by: Robin Appelman <robin@icewind.nl>
3 years ago
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 years ago
Robin Appelman
8a92229485
getStorage can also return null
Signed-off-by: Robin Appelman <robin@icewind.nl>
3 years ago
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Robin Appelman
81c5aa9819
set the mount id before calling storage wrapper
this allows the storage wrapper to use the mount id for it's own logic
Signed-off-by: Robin Appelman <robin@icewind.nl>
3 years ago
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Morris Jobke
45428e4948
Add config option to enable multibucket preview distribution
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
3 years ago
Morris Jobke
4fdd38c737
Use fixed preview buckets that are postfixed with -preview-NUMBER
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
3 years ago
Morris Jobke
159f28cd52
Mount the old previews in a separate folder for the multi bucket setup and check in them before using the actual locations
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
3 years ago
Morris Jobke
438ac23e2a
Distribute preview folders in appdata in multibucket setup to multiple buckets
* 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>
3 years ago
Robin Appelman
70906a359f
ensure home storage is initialized on first setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
4 years ago
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
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>
4 years ago
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Roeland Jago Douma
68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Vlastimil Pecinka
1c3abda280
Store user object later in the code
Signed-off-by: Vlastimil Pecinka <pecinka@email.cz>
5 years ago
Robin Appelman
f7ae235372
cache OC\Files\Mount\Manager::findIn results
Signed-off-by: Robin Appelman <robin@icewind.nl>
5 years ago
Robin Appelman
f8116ad4cf
use more efficient method to find mountpoint for path
this changes the complexity from the number of mounts to the depth of
the path
Signed-off-by: Robin Appelman <robin@icewind.nl>
5 years ago