]> source.dussan.org Git - nextcloud-server.git/commit
Add method to storage backends to get directory content with metadata 20232/head
authorRobin Appelman <robin@icewind.nl>
Fri, 27 Mar 2020 16:47:20 +0000 (17:47 +0100)
committerRobin Appelman <robin@icewind.nl>
Mon, 20 Apr 2020 13:45:04 +0000 (15:45 +0200)
commit9735b5d61f8577fea01810b5de3e1dab2ec6c77e
treec4e9d71dae03a4d49eec41fe09ec07243e355e83
parentb1a90da34730a6c119df4cb5b992177d8dbedeca
Add method to storage backends to get directory content with metadata

Currently you need to use `opendir` and then call `getMetadata` for
every file, which adds overhead because most storage backends already
get the metadata when doing the `opendir`.

While storagebackends can (and do) use caching to relief this problem,
this adds cache invalidation dificulties and only a limited number of
items are generally cached (to prevent memory usage exploding when
scanning large storages)

With this new methods storage backends can use the child metadata they
got from listing the folder to return metadata without having to keep
seperate caches.

Signed-off-by: Robin Appelman <robin@icewind.nl>
14 files changed:
apps/files_external/lib/Lib/Storage/SMB.php
apps/files_sharing/lib/External/Scanner.php
apps/files_sharing/lib/Scanner.php
lib/private/Files/Cache/Scanner.php
lib/private/Files/ObjectStore/NoopScanner.php
lib/private/Files/Storage/Common.php
lib/private/Files/Storage/Local.php
lib/private/Files/Storage/Storage.php
lib/private/Files/Storage/Wrapper/Availability.php
lib/private/Files/Storage/Wrapper/Encoding.php
lib/private/Files/Storage/Wrapper/Encryption.php
lib/private/Files/Storage/Wrapper/Jail.php
lib/private/Files/Storage/Wrapper/PermissionsMask.php
lib/private/Files/Storage/Wrapper/Wrapper.php