Skip to content
Snippets Groups Projects
Commit a8c54798 authored by Steffen Ritter's avatar Steffen Ritter Committed by Ernesto Baschny
Browse files

[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
driver.

The latter not only will fail for all storages having non-path
identifiers it is more overhead to create the folder objects
manually anyhow.

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.

Releases: 6.2
Resolves: #54226
Change-Id: I651d62340186dd9ac57277b498f8f98ee160dfd2
Reviewed-on: https://review.typo3.org/26724
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
parent 3ac80662
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment