Main Content

removePath

Remove folder from project path

Description

example

removePath(proj,folderpath) removes a folder from the current project path. The folder must be in the project.

Examples

collapse all

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

openExample("matlab/TimesTableProjectExample")
proj = currentProject;

Create a new folder.

 folderpath = fullfile(proj.RootFolder,"folder");
 mkdir(filepath);

Add this new folder to the project.

 projectFile = addFile(proj,folderpath);

Add this new folder to the project path.

folderpath = addPath(proj,folderpath);

Remove the new folder from the project path.

removePath(proj,folderpath)

Input Arguments

collapse all

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

Path of the folder to remove from the project path, specified as a character vector or string scalar. The folder must be within the root folder.

Version History

Introduced in R2019a