Main Content
replace
Class: matlab.buildtool.io.FileCollection
Namespace: matlab.buildtool.io
Description
newfc = replace(
replaces all occurrences of the substring fc
,old
,new
)old
in the paths of the file
collection fc
with new
. The method returns the new
file collection as a matlab.buildtool.io.FileCollection
array the same size
as fc
.
You can use newfc
to specify task inputs and outputs. For more
information about task inputs and outputs, see Improve Performance with Incremental Builds.
Input Arguments
Examples
Tips
replace
is a convenience method:newfc = fc.replace(old,new)
is functionally equivalent tonewfc = fc.transform(@(paths) replace(paths,old,new))
.
Version History
Introduced in R2023b