find startINR ftype (pathComp:rest) = do
  dh <- openDirectory startINR
  sr <- findDE dh pathComp (if null rest then ftype else Directory)
  case sr of
    DF_NotFound         -> return $ DF_NotFound
    DF_WrongFileType ft -> return $ DF_WrongFileType ft
    DF_Found (de, _)    -> find (deInode de) ftype rest

-- | Locate the given directory entry typed file by filename in the
-- DirHandle's content map
find startINR ftype (pathComp:rest) = do
  dh <- openDirectory startINR
  sr <- findDE dh pathComp (if null rest then ftype else Directory)
  case sr of
    DF_NotFound         -> return $ DF_NotFound
    DF_WrongFileType ft -> return $ DF_WrongFileType ft
    DF_Found (de, _)    -> find (deInode de) ftype rest

-- | Locate the given directory entry typed file by filename in the
-- DirHandle's content map
find startINR ftype (pathComp:rest) = do
  dh <- openDirectory startINR
  sr <- findDE dh pathComp (if null rest then ftype else Directory)
  case sr of
    DF_NotFound         -> return $ DF_NotFound
    DF_WrongFileType ft -> return $ DF_WrongFileType ft
    DF_Found (de, _)    -> find (deInode de) ftype rest

-- | Locate the given directory entry typed file by filename in the
-- DirHandle's content map