addFile
R2026bAdd files or folders to project
Description
Note
Starting in R2026b, you can create or convert a project to use the single
TOML project definition file (matlab.toml). In TOML‑based projects, the project definition
does not manage file membership, so you do not need
addFile to add files to the project. However,
addFile still adds files to source control.
addFile(
adds files and folders to the project proj,filesAndFolders)proj. When adding a
folder to the project, MATLAB® only adds the specified folder. To add the folder including any all
subfolders and files, use addFolderIncludingChildFiles instead.
newfiles = addFile(
returns an array of proj,filesAndFolders)ProjectFile objects for the added files.