listModifiedFiles

List modified files in project

Description

example

modifiedfiles = listModifiedFiles(proj) returns the modified project files in the specified project. The function refreshes the source control status in the project, and then returns an array of project files which are listed in the Modified Files view of the project.

Examples

collapse all

Open the Times Table App project. Use currentProject to create a project object from the currently loaded project.

matlab.project.example.timesTable
proj = currentProject;

Modify the project name.

proj.Name = "Better Times Table App";

Get all the modified files in the project.

modifiedfiles = listModifiedFiles(proj)
modifiedfiles = 

  1x2 ProjectFile array with properties:

    Path
    Labels
    Revision
    SourceControlStatus

Observe that two files are modified. Compare this with the Modified Files view in the project, where you can see two modified project metadata files in the resources folder

Input Arguments

collapse all

Project, specified as a matlab.project.Project object. Use currentProject to create a project object from the currently loaded project.

Output Arguments

collapse all

Modified files, returned as an array of ProjectFile objects.

Introduced in R2019a