Main Content Class


Add Folder property support to datastore

Since R2020a

Description is an abstract mixin class that adds support for a Folders property (and thus the FolderLayout name-value pair of writeall) to custom datastores.

To use this mixin class, you must inherit from the class, in addition to the and classes. Use this syntax as the first few lines in your class definition file:

classdef MyDatastore < & ....
              & ...
To add support for a Folders property to your custom datastore, you must:

  • Inherit from the class.

  • Use the populateFoldersFromLocation method in the datastore constructor to indicate the location from which to populate the Folders property.

The class is a handle class.


expand all

List of folders used to construct datastore, returned as a cell array of character vectors. This property is populated by the populateFoldersFromLocation method. The Folders property is populated differently depending on the value of the location input to the datastore constructor. If the location input specifies:

  • Folder names — All folder names in the location input are directly added to the Folders property.

  • File names — The parent folders of all input file names are added to the Folders property.

  • Wildcard names — Wildcard strings passed to the datastore constructor are matched to file names on disk. The parent folders of these file names are then added to the Folders property.



Data Types: cell


expand all

Version History

Introduced in R2020a