Link to home
Start Free TrialLog in
Avatar of KurtVon
KurtVon

asked on

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?
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KurtVon
KurtVon

ASKER

So there isn't a clean universal way to access that information?

Oh well.
No AFAIK

:-)