matlab.io.datastore.FileWritable.currentFileIndexComparator - Compare file indices - MATLAB (original) (raw)
Main Content
Class: matlab.io.datastore.FileWritable
Namespace: matlab.io.datastore
Syntax
tf = currentFileIndexComparator(ds,ind)
Description
tf = currentFileIndexComparator([ds](#d126e520701),[ind](#mw%5Fc98a852d-f83a-43a5-9e66-7dc739abe264))
compares the write index ind
to the read index of the current file being read by the datastore. The result is a logical 1
(true
) when the indices are the same, and a logical 0
(false
) otherwise. This provides an indication of the number of reads per file.
If your custom datastore subclasses from matlab.io.datastore.FileWritable
, then it inherits a currentFileIndexComparator
method that always returnsfalse
. If the datastore primarily works with files that require multiple reads per file, then you must implement your own getCurrentFilename
andcurrentFileIndexComparator
methods in the subclass. These methods tell the datastore which file is being read, and whether the file requires multiple reads.
Input Arguments
Write index, specified as a positive integer scalar.
Version History
Introduced in R2020a