Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > search files in directory

Reply
Thread Tools

search files in directory

 
 
Guest
Posts: n/a
 
      09-13-2003
I want something like DOS "dir" or Linux "ls" to retrieve the contents of one directory.

Is this possible with Java's API?


 
Reply With Quote
 
 
 
 
Gordon Beaton
Guest
Posts: n/a
 
      09-13-2003
On Sat, 13 Sep 2003 15:48:22 +0300, <- Chameleon -> wrote:
> I want something like DOS "dir" or Linux "ls" to retrieve the
> contents of one directory.
>
> Is this possible with Java's API?


If you'd looked at the API documentation you'd have had no trouble
finding this:

http://java.sun.com/j2se/1.4.2/docs/...tml#listFiles()

/gordon

--
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      09-13-2003
On Sat, 13 Sep 2003 15:48:22 +0300, "<- Chameleon ->"
<> wrote or quoted :

>I want something like DOS "dir" or Linux "ls" to retrieve the contents of one directory.
>
>Is this possible with Java's API?


see http://mindprod.com/jgloss/file.html

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      09-13-2003
On 13 Sep 2003 16:14:14 +0200, Gordon Beaton <> wrote or
quoted :

>If you'd looked at the API documentation you'd have had no trouble
>finding this:


That is not true. Java hides the directory manipulating functions in
the File class, not exactly where any sane person would expect to find
them.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System.IO.Directory.GetDirectories() and System.IO.Directory.GetFiles() are not returning the specified directory Nathan Sokalski ASP .Net 2 09-06-2007 03:58 PM
| SEO , Search Engine Optimizer, SEARCH OPtiMIzAtIoN with SeaRch OPtiMizer optimizer.seo@gmail.com Digital Photography 0 04-22-2007 04:20 AM
Active Directory Search fails ("The directory service is unavailab ejcosta ASP .Net Security 2 10-08-2004 09:57 AM
search within a search within a search - looking for better way...my script times out Abby Lee ASP General 5 08-02-2004 04:01 PM
list all css files in a directory and sub directory TJS ASP .Net 1 06-23-2004 10:49 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57