code: def filedir_lookup(self, p, fd=None):
          
          if fd is None:
              fd = self.default_filedir
          dir, name = os.path.split(fd)
          drive, d = _my_splitdrive(dir)
          if not name and d[:1] in ('/', OS_SEP):
              #return p.fs.get_root(drive).dir_on_disk(name)
              return p.fs.get_root(drive)
          if dir:
              p = self.filedir_lookup(p, dir)
              if not p:
                  return None
          norm_name = _my_normcase(name)
          try:
              node = p.entries[norm_name]
          except KeyError:
              return p.dir_on_disk(name)
          if isinstance(node, Dir):
              return node
          if isinstance(node, Entry):
              node.must_be_same(Dir)
              return node
          return None
docs: A helper method for find_file() that looks up a directory for
          a file we're trying to find.  This only creates the Dir Node if
          it exists on-disk, since if the directory doesn't exist we know
          we won't find any files in it...  :-)
  
          It would be more compact to just use this as a nested function
          with a default keyword argument (see the commented-out version
          below), but that doesn't work unless you have nested scopes,
          so we define it here just so this work under Python 1.5.2.