[jcifs] smbFile.list/listFiles - 'max' type setting?
binarymonk01 at yahoo.com
Tue Nov 22 08:40:15 MST 2011
I'm using the great features of jcifs, and the smbFile.list() and smbFile.listFiles(), both with filters.
However, I only want to work on a portion of files at a time, but it appears (even with the filters set) it spends a lot of time spinning through all the files in a directory instead of only the (first) X amount I want to look at.
My process I move files out of the directory after review, so I know they will be moved out so I can look at the next 'X' amount.
Question: Is there a way to limit/stop looking for files after a set number that prevents further processing? The filters themselves still review each file, while I would rather under-the-covers just stop checking all together after a set number.
Usecase: a directory with 100k files, looking at 10 files at a time (either through smbFile.list or smbFile.listFile, latter is my primary usage), but still spins through all 100k files per 10 file review.
thanks for any ideas/feedback,
More information about the jCIFS