+ FileSystemNode SelectLocation(char * location)
+ {
+ int c;
+ char * temp;
+ char step[MAX_LOCATION];
+
+ //StringArray steps { growingFactor = 4 };
+ Array<String> steps { };
+ FileSystemNode result = null;
+ FileSystemNode node = null;
+
+ temp = CopyString(location);
+ while(temp[0])
+ {
+ GetLastDirectory(temp, step);
+ StripLastDirectory(temp, temp);
+ steps.Add(CopyString(step));
+ }
+
+ for(c = steps.count - 1; c >= 0; c--)
+ {
+ char * t = steps[c];
+ node = Find(steps[c], node);
+ if(!node)
+ break;
+ //Select(node);
+ }
+ if(node)
+ {
+ result = node;
+ Select(result);
+ }
+
+ steps.Free();
+ delete temp;
+ delete steps;
+
+ return result;
+ }
+