SHARE
TWEET

Untitled

a guest Feb 15th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  dirNode *dirNode::findNode(string pathname) {
  2.  dirTokenizer path = dirTokenizer(pathname);
  3.  string dir = path.next();
  4.  dirNode *cur=this;
  5.  if (cur‐>name != dir) return NULL;
  6.  dir = path.next();
  7.  if (dir == "") return cur;
  8.  cur = cur‐>firstChild;
  9.  while (cur != NULL) {
  10.  if (cur‐>name != dir) {
  11.  cur = cur‐>nextSibling;
  12.  continue;
  13.  }
  14.  dir = path.next();
  15.  if (dir == "") return cur;
  16.  else cur = cur‐>firstChild;
  17.  }
  18.  return cur;
  19.  }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top