matlab.automation.streams.ToUniqueFile Class
Namespace: matlab.automation.streams
Superclasses: matlab.automation.streams.OutputStream
Output stream to write text to unique file
Renamed from matlab.unittest.plugins.ToUniqueFile in R2023a
Description
The matlab.automation.streams.ToUniqueFile class provides an output stream to write text to a unique,
UTF-8 encoded file. Whenever text prints to this stream, the output stream opens the file,
appends the text, and closes the file.
A ToUniqueFile instance prevents text output from being overwritten when
saving data to disk. For example, when running tests in parallel (requires Parallel Computing Toolbox™), you can use this class to direct results from test suite portions to separate
files.
The matlab.automation.streams.ToUniqueFile class is a handle class.
Creation
Description
stream = matlab.automation.streams.ToUniqueFile(
creates an output stream to write text to a unique file in the specified folder. The
testing framework creates a unique filename for the output stream.folderName)
stream = matlab.automation.streams.ToUniqueFile(
specifies options using one or more name-value arguments. For example, folderName,Name=Value)stream =
matlab.automation.streams.ToUniqueFile(pwd,WithPrefix="myOutput_") creates an
output stream to write text to a unique file whose name starts with
"myOutput_" in the current folder.
Input Arguments
Name-Value Arguments
Properties
Examples
Extended Capabilities
Version History
Introduced in R2018aSee Also
Functions
Classes
matlab.automation.streams.ToFile|matlab.automation.streams.ToStandardOutput|matlab.unittest.plugins.TAPPlugin