Main Content



Get folders backing datastore

Since R2020a


f = getFolders(ds)


f = getFolders(ds) returns a list of folders backing the datastore ds.

If your custom datastore subclasses from, then it inherits a getFolders method that refers to the Folders property of the datastore. So, if the datastore does not have a Folders property, then you must implement your own getFolders method in the subclass. For information on adding a Folders property, see

Input Arguments

expand all

Input datastore, specified as a datastore object that inherits from To create a datastore object, see

Output Arguments

expand all

List of folders, returned as a cell array of character vectors oriented as a column vector. The cell array contains absolute paths to the folders referenced by the datastore.



To learn about attributes of methods, see Method Attributes.

Version History

Introduced in R2020a