Main Content

getFolders

Class: matlab.io.datastore.FileWritable
Package: matlab.io.datastore

Get folders backing datastore

Syntax

f = getFolders(ds)

Description

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

If your custom datastore subclasses from matlab.io.datastore.FileWritable, 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 matlab.io.datastore.FoldersPropertyProvider.

Input Arguments

expand all

Input datastore, specified as a datastore object that inherits from matlab.io.datastore.FileWritable. To create a datastore object, see matlab.io.Datastore.

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.

Attributes

Accessprotected

To learn about attributes of methods, see Method Attributes.

Introduced in R2020a