Folder::Attach

Description

Attach or re-attach an existing folder object to a named instance

Syntax

Attach( LPCSTR lpcszPathName )

Parameters

lpcszPathName
[input] Absolute path reference string

Return

Examples

EX1

// Attach or re-attach a folder object to a named instance
void    Folder_Attach_Ex1()
{
    Folder fld;
    fld.Attach("/");  // attach to root folder (the project name)
    printf("Project name is %s\n", fld.GetName());
    Folder    fldSub = fld.AddSubfolder("test");
    fld.Attach("/test");
    // If you execute this example twice, note how the object is not attached to the newest created folder
    printf("Subfolder name is %s\n", fld.GetName());
}

Remark

Attach the folder object to a folder.

See Also

header to Include

origin.h