Issue Task Closed

#53688ResourceFactory::createFileObject is called from Folder::getFiles directly

Steffen Ritter 11/16/13, 08:27 updated 10/23/17, 21:46

Description

sysext/core/Resource/Folder::getFiles directly collects the files from the driver (very expensive!) and creates FileObjects directly.
These FileObjects do not know of their index record!

The method has to be restructered. With method FileIndexRepository::findByFolder (introduced with #53687) the folder’s index records can be retrieved.
  • The driver already provides a method that only returns the existing identifiers instead of extracting the file’s data.
  • In case the IndexRecord is already present, the method calls ResourceFactory::getFile($uid, $indexRecord) otherwise ResourceFactory::getFileObjectByStorageAndIdentifier() is used.

Reviews 1