Main Content

removeFolder

Remove member folder from package

Since R2024b

    Description

    removeFolder(pkg,folders) removes the specified member folders from the package and updates the Folders property of the package object. The package pkg must be in editable mode.

    example

    Examples

    collapse all

    Create a package named MyPackage. Add a member folder named Classes to MyPackage.

    pkg = mpmcreate("MyPackage","MyPackage");
    mkdir("MyPackage/Classes")
    addFolder(pkg,"Classes")
    pkg.Folders
    ans = 
    
      PackageFolder with properties:
    
        Path: "Classes"

    Remove Classes from the package.

    removeFolder(pkg,"Classes")
    pkg.Folders
    ans = 
    
      1×0 PackageFolder array with properties:
    
        Path

    Input Arguments

    collapse all

    Package, specified as a matlab.mpm.Package object.

    Member folders to remove, specified as a string array where each element is the path to a folder, or a matlab.mpm.PackageFolder array.

    Version History

    Introduced in R2024b