function future = listFolders(pool)
% parallel.pool.listFolders lists all folders that exist on each worker
%    F = parallel.pool.listFolders(POOL) executes on each worker to indicate
%    which subfolders exist. F is parallel.FevalOnAllFuture from which results
%    can be obtained for each worker individually. Under normal circumstances
%    the results will be the same on each worker.

% Copyright 2014 The MathWorks, Inc.

validateattributes(pool, {'parallel.Pool'}, {'scalar'});
future = listFolders(parallel.internal.pool.FolderManagement.getForPool(pool));
end
