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.

matlab.project.example.timesTable
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. Specify the path relative to the project root folder. The folder must be within the root folder.

Introduced in R2019a