[Last Call] Learn how to a build a cloud-first strategyRegister Now


Find out if a URL is a directory

Posted on 2006-05-02
Medium Priority
Last Modified: 2010-08-05
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?
Question by:KurtVon
  • 2
LVL 86

Accepted Solution

CEHJ earned 500 total points
ID: 16590031
LVL 11

Author Comment

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

Oh well.
LVL 86

Expert Comment

ID: 16590313


Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month18 days, 11 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question