matlab.io.datastore.FileWritable.getCurrentFilename - Get file name of file read by datastore - MATLAB (original) (raw)
Main Content
Class: matlab.io.datastore.FileWritable
Namespace: matlab.io.datastore
Get file name of file read by datastore
Syntax
n = getCurrentFilename(ds,info)
Description
[n](#mw%5F9b3be139-7c68-4a59-84ef-bf7be1d8fcba) = getCurrentFilename([ds](#d126e520820),[info](#mw%5F323457b9-4792-4653-ac3a-9211914491ea))
returns the file name of the file currently being read by the datastoreds
.
If your custom datastore subclasses from matlab.io.datastore.FileWritable
, then it inherits a getCurrentFilename
method that retrieves the file name from the info
output of the read
method. If the datastore primarily works with files that require multiple reads per file, then you must implement your own getCurrentFilename
and currentFileIndexComparator
methods in the subclass. These methods tell the datastore which file is being read, and whether the file requires multiple reads.
Input Arguments
Data info returned by read
, specified as a structure.
Output Arguments
File name, returned as a character vector.
Version History
Introduced in R2020a