matlab.buildtool.io.FileCollection class
Package: matlab.buildtool.io
Description
The matlab.buildtool.io.FileCollection
class represents a collection of
files and folders. You can use this class to specify file-based inputs and outputs of a task.
Specifying inputs or outputs of a task enables the build tool to skip the task if it
determines that the task inputs and outputs have not changed since the last successful run.
For more information, see Improve Performance with Incremental Builds.
Creation
When you assign a string vector, character vector, or cell vector of character vectors to
the Inputs
or Outputs
properties of a task,
MATLAB® automatically converts the assigned value to a FileCollection
vector. For example, plan("myTask").Inputs = ["file1" "file2"]
results in a
1-by-2 FileCollection
vector.
To explicitly create a FileCollection
object, use the files
method.
Methods
Examples
Tips
If you set the
Inputs
andOutputs
properties of a task using strings, the build tool uses your current folder to resolve any relative paths. If you use thefiles
method instead, the build tool uses the plan root folder to resolve relative paths.
Version History
Introduced in R2023a