No official way to retrieve the parent container, but this is useful quite often...
therefore --> add it and remove the hacks in the file module
[TASK] Add API to retrieve the parent folder of a resource
Currently if some code needs the parent directory or folder
object of some files or folders it either needs to query the
storage object for the identifier of the parent folder and then
create the folder object manually or needs to fiddle around with
the identifier manually, assuming that all identifiers are a
representation of a hierarchical path as it is for the local
The latter not only will fail for all storages having non-path
identifiers it is more overhead to create the folder objects
This patch adds "getParentFolder" to the ResourceInterface and
implements the method in AbstractFile and Folder as well as it
replaces the manual resolval in the file list module.
Reviewed-by: Alexander Opitz
Reviewed-by: Marcin Sągol
Reviewed-by: Sebastian Fischer
Tested-by: Sebastian Fischer
Reviewed-by: Ernesto Baschny
Tested-by: Ernesto Baschny
[BUGFIX] Followup to #54226
The fix for issue #54226 introduced a bug
with FileReferences as it did not implement the
change of the interface.