MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1
movefile("..\..\source\timesTableGame.m");
addFile(timesTableGame,"timesTableGame.m");

reload(mainProject);
removeFile(mainProject,"source\timesTableGame.m");

Add the Times Table Game project root folder to the Times Table Game project path. This
makes the timesTableGame.m file available when the Times Table App project or any
project that references the Times Table App project is loaded.

reload(timesTableGame);
addPath(timesTableGame,timesTableGame.RootFolder);

Add a Project Reference

Add the new Times Table Game project to the Times Table App project as a project
reference. This allows the Time Table App project to view, edit, and run files in the Time
Game project.

reload(mainProject);
addReference(mainProject,timesTableGame);

Get Modified Files

Get all the modified files in the Times Table App project. Compare this list with the Files
> Modified view in the project. You can see the files for the new Times Table Game
project, as well as the removed and modified files in the Times Table App project.

modifiedfiles = listModifiedFiles(mainProject)

modifiedfiles =
1×19 ProjectFile array with properties:

Path
Labels
Revision
SourceControlStatus

Get the second modified file in the list. Observe that the SourceControlStatus
property is Added. The listModifiedFiles function returns any files that are added,
modified, conflicted, deleted, and so on.

modifiedfiles(2)

31 Projects

Free download pdf