/*
****************************************************************************
* mkdir()
****************************************************************************
*/
/**
* Creates an entry under this CacheNode for the given subsegments
* @param oAuth - The authority to add
* @param n - The index of the subsegment to start with
* @param iTargetDepth - The index of the subsegment to stop at.
* @return The final CacheNode created by this method
*/
internal CacheNode mkdir(XRIAuthority oAuth, int n, int iTargetDepth)
{
XRISubSegment oSubSegment = oAuth.getSubSegmentAt(n);
if (oSubSegment == null) {
return this;
}
CacheNode oNode = mkdir(oSubSegment.ToString());
return ((n + 1) < iTargetDepth)
? oNode.mkdir(oAuth, n + 1, iTargetDepth) : oNode;
}