java.lang.Object
org.codelibs.jcifs.smb.impl.DirFileEntryEnumIteratorBase
org.codelibs.jcifs.smb.impl.DirFileEntryEnumIterator2
- All Implemented Interfaces:
AutoCloseable,Iterator<FileEntry>,CloseableIterator<FileEntry>
SMB2/SMB3 implementation of directory entry enumeration iterator.
Provides efficient directory listing capabilities for SMB2/SMB3 protocol versions.
- Author:
- mbechler
-
Constructor Summary
ConstructorsConstructorDescriptionDirFileEntryEnumIterator2(org.codelibs.jcifs.smb.impl.SmbTreeHandleImpl th, SmbResource parent, String wildcard, ResourceNameFilter filter, int searchAttributes) Creates a directory entry enumeration iterator for SMB2 protocol. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidPerforms internal closing operations for SMB2 enumeration.protected booleanFetches more entries from the server.protected FileEntry[]Gets the current batch of results.protected booleanisDone()Checks if the enumeration is complete.protected FileEntryopen()Opens a directory for enumerationMethods inherited from class org.codelibs.jcifs.smb.impl.DirFileEntryEnumIteratorBase
advance, close, doClose, getParent, getSearchAttributes, getTreeHandle, getWildcard, hasNext, next, removeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
DirFileEntryEnumIterator2
public DirFileEntryEnumIterator2(org.codelibs.jcifs.smb.impl.SmbTreeHandleImpl th, SmbResource parent, String wildcard, ResourceNameFilter filter, int searchAttributes) throws CIFSException Creates a directory entry enumeration iterator for SMB2 protocol.- Parameters:
th- the SMB tree handle for the connectionparent- the parent resource being enumeratedwildcard- the wildcard pattern for filtering entriesfilter- additional resource name filter to applysearchAttributes- the file attributes to search for- Throws:
CIFSException- if an error occurs during initialization
-
-
Method Details
-
getResults
Gets the current batch of results.- Specified by:
getResultsin classDirFileEntryEnumIteratorBase- Returns:
- array of file entries in the current batch
- See Also:
-
open
Opens a directory for enumeration- Specified by:
openin classDirFileEntryEnumIteratorBase- Returns:
- the opened directory file entry
- Throws:
CIFSException- if an error occurs opening the directory
-
fetchMore
Fetches more entries from the server.- Specified by:
fetchMorein classDirFileEntryEnumIteratorBase- Returns:
- true if more entries were fetched, false otherwise
- Throws:
CIFSException- if an error occurs during fetching- See Also:
-
isDone
protected boolean isDone()Checks if the enumeration is complete.- Specified by:
isDonein classDirFileEntryEnumIteratorBase- Returns:
- true if enumeration is done, false otherwise
- See Also:
-
doCloseInternal
Performs internal closing operations for SMB2 enumeration.- Specified by:
doCloseInternalin classDirFileEntryEnumIteratorBase- Throws:
CIFSException- if an error occurs during closing
-