Main Content

addFolders

Class: Simulink.CloneDetection.Settings
Namespace: Simulink.CloneDetection

Add folders with models

Syntax

cloneDetectionSettings = addFolders(cloneDetectionSettings,FolderName)

Description

cloneDetectionSettings = addFolders(cloneDetectionSettings,FolderName) adds the folder path to the cloneDetectionSettings object.

Input Arguments

expand all

Clone Detection Settings, specified as a Simulink.CloneDetection.Settings object.

Name or path of the folder, specified as a character vector.

Output Arguments

expand all

Clone Detection Settings, specified as a Simulink.CloneDetection.Settings object.

Examples

expand all

This example shows how to add a folder to a cloneDetectionSettings object. When you add a folder to the clone detection settings, the findClones function can find clones in the models inside the folder. Suppose the folder name is Folder1.

Save the folder name, Folder1, to the variable FolderName.

FolderName = 'Folder1';

Create a Simulink.CloneDetection.Settings object.

cloneDetectionSettings = Simulink.CloneDetection.Settings();

Add the folder name to the clone detection settings.

addFolders(cloneDetectionSettings,FolderName);
 

The folder name appears in the Folders property in the clone detection settings.