GetFolder
Return a folder object from its name
Folder GetFolder( LPCSTR strPathName )
Returns a Folder object
EX1
// "/name", use absolute search. The project can be omitted in this method. // "../name", use relative search. Find folder name as "name" from current folder's parents' folder. // Demonstrate getting a folder via each kind of path reference string void Folder_GetFolder_Ex1() { // Create two subfolders off root folder Folder fldRoot("/"); fldRoot.AddSubfolder("MyFolder1"); Folder fldMyFolder1("/MyFolder1"); fldRoot.AddSubfolder("MyFolder2"); Folder fldMyFolder2("/MyFolder2"); // Attach to a subfolder of root using an absolute reference string Folder fldCurr = fldRoot.GetFolder("/MyFolder1"); string strCurrName = fldCurr.GetName(); printf("The current folder is %s\n", strCurrName); // Attach to a sibling folder of MyFolder1 using a relative string reference fldCurr = fldMyFolder1.GetFolder("../MyFolder2"); strCurrName = fldCurr.GetName(); printf("The current folder is %s", strCurrName); }
You can use relative and absolute ways to Get a Folder. The name is not case sensitive.
OriginC:Folder::AddFolder
origin.h