aspose file tools*
The moose likes Beginning Java and the fly likes How well to list the content of a directory in java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How well to list the content of a directory in java?" Watch "How well to list the content of a directory in java?" New topic
Author

How well to list the content of a directory in java?

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
How well to list the content of a directory in java?
Jon Strayer
Ranch Hand

Joined: Dec 04, 2002
Posts: 133
See java.io.File


Jon
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
hi Sergio,
also, beware of "Symbolic" links in the directory you are listing, to which you might not have access for listing, if you are on Unix. because if you are listing directories recursively (if you know what i mean) then that will give you error when you run the code and try to list directory that is a symbolic link to which your account doesn't have proper access rights. this might happen even if you are not using recursive approach but just listing for the current directory or something ...
there is no method, atleast i didn't find, in API that directly tells us if something is symbolic link or not..i had to write my own method for it...thats not difficult though...
regards
maulin
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How well to list the content of a directory in java?