renameRecipeFolderEx

[ Function ]

public static renameRecipe FolderEx (
    recipe FolderName: string,
    path: string | null,
    newName: string,
    newPath: string | null,
    options?: TcHmi.Server.RecipeManagement.IRecipeOptions | null,
    requestOptions: TcHmi.Server.IRequestOptions | null = null,
    callback: null | ((this: void, data: TcHmi.IResultObject) => void) = null
): TcHmi.IErrorDetails;

Renames a recipe folder.

Parameter

Name

Type

Description

recipeName

string

Name of the recipe folder. The name may include the full path. In this case, '::' must be used as the separator for folders.

path

string

Path of the destination folder. If this is not specified, the system searches for the recipe type in the main folder.

newName

string

New name of the recipe. The name may include the full path. In this case, '::' must be used as the separator for folders.

newPath

string

Path of the new destination folder. If this is not specified, the recipe type is created in the main folder.

options

TcHmi.Server.RecipeManagement.IRecipeOptions, null

Recipe management options

requestOptions

TcHmi.Server.IRequestOptions, null

Server request options

callback [ optional ]

(data: TcHmi.IResultObject) => void, null

Asynchronous callback function that is triggered once the action is completed.

Return value

Type

Description

TcHmi.IErrorDetails

Returns confirmation as to whether the operation was successfully sent.

renameRecipeFolderEx 1:

Available from version 1.10.1336.60

Sample - JavaScript

TcHmi.Server.RecipeManagement.renameRecipeFolderEx (
    'recipeFolder10',
    'testRecipeCategory',
    'rootRecipeFolder11', // new name
    null, // new path not give so the recipe Folder is moved to root folder
    null,
    {timeout: 2000},
    function(data) {
        if (data.error === TcHmi.Errors.NONE) {
            // Success
        } else {
            // Error
        }
    }
);