def __init__(self, root):
    if isdir(root):
      self.root = abspath(root)
    else:
      raise ValueError("Invalid root directory '%s'" % root)
    self.nodeCache = {}
    self.nodeCachingBehavior = DEFAULT_NODE_CACHING_BEHAVIOR