%% Check If Blocked File-Set Has Another Block
% Check if a blocked file-set has another block available to process and read the data iteratively.
% Create a blocked file-set bs for a collection of files.

folder = {'accidents.mat','airlineResults.mat','census.mat','earth.mat'}
bs = matlab.io.datastore.BlockedFileSet(folder)

%
% Use the hasNextBlock and nextblock functions to read block information one block at a time while blocks remain in the set.
%

while hasNextBlock(bs)
   file = nextblock(bs)
end

% Copyright 2019 The MathWorks, Inc.