%OutputFolderCheckResult
% A data class that returns the results of whether the output folder exists.

%   Copyright 2015-2016 The MathWorks, Inc.

classdef (Sealed, Hidden) OutputFolderCheckResult
    properties (SetAccess = immutable)
        OutputExists = true; % Flag that states whether the output folder exists.
    end
    
    methods
        % Create a OutputFolderCheckResult.
        % Syntax:
        %   result = OutputFolderCheckResult()
        %   result = OutputFolderCheckResult(outputExists)
        function obj = OutputFolderCheckResult(outputExists)
            if nargin
                obj.OutputExists = outputExists;
            end
        end
        
        % Obtains the result of whether the output folder is accessible
        % from the worker.
        %
        % This can be called on an array of OutputFolderCheckResult.
        function result = isOutputAccessible(obj)
            result = all([obj.OutputExists]);
        end
    end
end
