🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #3405

Re: Searching URL directories

#3405
From: Andrew Bennett
Date: Mon, 05 Jan 1998 00:00
30 lines
1421 bytes


Brent Thompson wrote:

> I'd like to take a URL and search all it's subdirectories to make a list
> of all html docs.  I'm writting an application.  How can I do It?  I'm
> looking for and example of source code.

You'll have to write some code.  You can do a nice loop though.  I'll
describe:

get current directory
use java.io.File's getDirectory() on each node
  - if it's a directory, add it to another array or something
  - if it's a html doc, then add it to an array or something
loop to next file

Now, if you want to recurse, write a recursive routine to
go into each directory and proceed.

Hope that helps.


Andrew
--
  Andrew Bennett            ->  abennett@borland.com
  JBuilder info             ->  http://www.borland.com/jbuilder/
  JBuilder newsgroups info  ->  http://www.borland.com/newsgroups/
**** Please don't post a reply AND send email.  Do one.  I'll see it. ****
Technical Details
Message-ID: <34B1304E.D98BDDCC@borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <34B11167.15B1385F@agency.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,d510a2c47cc97f9
X-Google-Attributes: gid1089d0,public
From: Andrew Bennett <abennett@borland.com>
Subject: Re: Searching URL directories
Date: 1998/01/05
Message-ID: <34B1304E.D98BDDCC@borland.com>
X-Deja-AN: 313029524
Content-Transfer-Encoding: 7bit
References: <34B11167.15B1385F@agency.com>
Content-Type: text/plain; charset=us-ascii
Organization: None
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.api