[jcifs] Recursive Deletes

andy chernow achernow at yahoo.com
Fri Aug 23 13:30:53 EST 2002


Is is possible to send the SMB Server one packet to
delete a whole directory.  Currently, SmbFile.delete()
does a listFiles() and individually deletes each file
withn the directory.  This can become quite a long
process if there are over 5000 files contained within
the given directory and it's sub-directories.  I guess
I am wondering if there is a way to do this in one
operation on the server side.  

It would also be nice if there was a way to stat a
directory on the server-side.  By stat I mean, the
directories fileCount, DirectoryCount and total size
in bytes...all file sizes added up.  I currently have
to go through all sub-directories searching for files
and add up file.length() and increment a
fileCount/dirCount variable.  This also becomes time
consuming due to the amount of requests invovled.

/sLaKr


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com



More information about the jcifs mailing list