smbFile.list/listFiles - 'max' type setting?
Darren Hartford <[email protected]>
| Newsgroups | gmane.network.samba.java |
|---|---|
| Message-ID | <[email protected]> |
Hey all, 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, -D