%% Return to Previous Block in Blocked File-Set
% Return to a previous block in a blocked file-set to get block information.
% Create a blocked file-set bs for a collection of blocks.

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)

% Get information for the second block again and recede the internal pointer to the second block.

prev = previousblock(bs)

%
% Copyright 2019 The MathWorks, Inc.
%