Find out if a URL is a directory

I have a URL which, at least for now, is garanteed to be either a file:// or ftp:// reference.  I need some way of determining whether it is pointing to a file or a directory.  To be more exact I need to recurse the directory tree, but I have everything else written so this is the only issue.

Because of the possibility of it being an ftp I can't use the trick of converting the URL into a File and calling isDirectory.  Is there a universal way to do this, or will I have to parse the type and use different methods depending on the URL?
LVL 11
Who is Participating?
KurtVonAuthor Commented:
So there isn't a clean universal way to access that information?

Oh well.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.