%% Check If Blocked File-Set Has Previous Block
% Check if a blocked file-set has a previous block available to process.
% 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)

% Get the information for the first block and move the internal pointer forward one block.

blk1 = nextblock(bs)

% Get information for the second block and move the internal pointer forward one block.

blk2 = nextblock(bs)

% Check to see if a previous block exists. In this case, the result is true because a previous block exists.

tf = hasPreviousBlock(bs)

% Copyright 2019 The MathWorks, Inc.