[jcifs] returning file properties with SmbFile.list()

Bruce Altner baltner at hq.nasa.gov
Sun Sep 23 18:34:39 EST 2001


I am brand new to jCIFS so please excuse me if this has already been 
asked...I am generating lists of files on different  shares and want to 
show other information besides the file name, such as type (file or 
directory), size, date, etc. List() only returns the file names (as a 
String[]). As a workaround I've had to iterate over the array of names, 
instantiating SmbFile for each file in order to get the attributes that I 
need using the isDirectory(), length(), lastmodified() methods. It works 
but it is very slow. I tried to extend SmbFile with a listAll() method to 
get all the properties on one pass but was unsuccessful.

How are others doing this? It must be a very common need.

Meanwhile, I am very excited about what jCIFS can do for the project I'm 
working on. I had been wrapping servlet code around calls to smbclient but 
jCIFS seems like a much better way to go.

"It's a magical world, Hobbes, ol' buddy...let's go exploring!" ---Calvin

Phone: 202-651-8553
Pager Email:8273479 at skytel.com

More information about the jcifs mailing list