Main Content

removeShortcut

Remove shortcut from project

Description

example

removeShortcut(proj,shortcut)removes the specified shortcut from the specified project.

Examples

collapse all

Open the Times Table App project. UsecurrentProjectto create a project object from the currently loaded project.

matlab.project.example.timesTable proj = currentProject;

Create a new file.

filepath = fullfile(proj.RootFolder,"newVariables.mat"); save(filepath)

Add this new file to the project.

projectFile = addFile(proj,filepath)

Add a new shortcut to the new file.

shortcut = addShortcut(proj,filepath);

Remove the shortcut.

removeShortcut(proj,shortcut);

Input Arguments

collapse all

Project, specified as amatlab.project.Projectobject. UsecurrentProjectto create a project object from the currently loaded project.

Shortcut to remove, specified as a character vector, string scalar, orShortcutobject. If you specifyshortcutas a character vector or string scalar, it must contain the path of the shortcut to remove relative to the project root folder, including the file extension. The shortcut must be in the project.

Introduced in R2019a