matlab.project.convertDefinitionFiles - Change definition file type of project - MATLAB (original) (raw)
Main Content
Change definition file type of project
Since R2020b
Syntax
Description
matlab.project.convertDefinitionFiles([projectRoot](#mw%5F0d4eb6f9-d318-48b1-981e-9d6cc6c61010),[definitionType](#mw%5Fa7457c79-deee-414e-878d-2f1780283b0f))
converts the definition file type of the project stored in projectRoot
to a new type specified by definitionType
.matlab.project.convertDefinitionFiles
preserves the source control history of your project.
Warning
To avoid merge issues, do not convert the definition file type more than once for a project.
Examples
Check which definition file management your project uses currently.
projectRoot = "C:/projects/myproject"; proj = openProject(projectRoot); currentDefinitionFileType = proj.DefinitionFilesType
currentDefinitionFileType =
DefinitionFiles enumeration
MultiFile
Close your project before converting the project definition file management.
Programmatically convert the project definition file management to use fixed-path multiple project files.
matlab.project.convertDefinitionFiles(projectRoot,matlab.project.DefinitionFiles.FixedPathMultiFile)
Check the new project definition file management.
proj = openProject(projectRoot); newDefinitionFileType = proj.DefinitionFilesType
newDefinitionFileType =
DefinitionFiles enumeration
FixedPathMultiFile
Input Arguments
Full path to project root folder, specified as a character vector or string scalar.
Example: "C:/projects/myproject"
Data Types: char
| string
Definition file type, specified asmatlab.project.DefinitionFiles.SingleFile
,matlab.project.DefinitionFiles.MultiFile
, ormatlab.project.DefinitionFiles.FixedPathMultiFile
.
Choose a definition file type based on your use case:
MultiFile
- Helps to avoid file conflicts when performing merge on shared projectsSingleFile
- Is faster but is likely to cause merge issues when two users submit changes in the same project to a source control toolFixedPathMultiFile
- Is better if you need to work with long paths
Version History
Introduced in R2020b