Class Directory
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterable<FileIdBothDirectoryInformation>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
Nested classes/interfaces inherited from class com.hierynomus.smbj.share.Open
Open.LockBuilder
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioniterator()
Equivalent to callingiterator(FileIdBothDirectoryInformation.class, null)
.<F extends FileDirectoryQueryableInformation>
Iterator<F> Equivalent to callingiterator(informationClass, null)
.<F extends FileDirectoryQueryableInformation>
Iterator<F> Returns an iterator of the contents of this directory.list()
Equivalent to callinglist(FileIdBothDirectoryInformation.class, null)
.<F extends FileDirectoryQueryableInformation>
List<F> Equivalent to callinglist(informationClass, null)
.<F extends FileDirectoryQueryableInformation>
List<F> Callsiterator(FileIdBothDirectoryInformation.class, null)
and collects the contents of the returned iterator in a list.toString()
watchAsync
(Set<SMB2CompletionFilter> completionFilter, boolean watchTree) Send a change notify request and and return a Future for change notify response.Methods inherited from class com.hierynomus.smbj.share.DiskEntry
closeNoWait, createHardlink, createHardlink, deleteOnClose, equals, flush, getDiskShare, getFileInformation, getFileInformation, getFileName, getPath, getSecurityInformation, getUncPath, hashCode, ioctl, ioctl, ioctl, rename, rename, rename, setFileInformation, setSecurityInformation, setSecurityInformation
Methods inherited from class com.hierynomus.smbj.share.Open
close, closeSilently, lockRequest, requestLock
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Method Details
-
list
Equivalent to callinglist(FileIdBothDirectoryInformation.class, null)
.- Throws:
SMBApiException
- See Also:
-
list
public <F extends FileDirectoryQueryableInformation> List<F> list(Class<F> informationClass) throws SMBApiException Equivalent to callinglist(informationClass, null)
.- Throws:
SMBApiException
- See Also:
-
list
public <F extends FileDirectoryQueryableInformation> List<F> list(Class<F> informationClass, String searchPattern) Callsiterator(FileIdBothDirectoryInformation.class, null)
and collects the contents of the returned iterator in a list.- See Also:
-
iterator
Equivalent to callingiterator(FileIdBothDirectoryInformation.class, null)
.- Specified by:
iterator
in interfaceIterable<FileIdBothDirectoryInformation>
- See Also:
-
iterator
public <F extends FileDirectoryQueryableInformation> Iterator<F> iterator(Class<F> informationClass) Equivalent to callingiterator(informationClass, null)
.- See Also:
-
iterator
public <F extends FileDirectoryQueryableInformation> Iterator<F> iterator(Class<F> informationClass, String searchPattern) Returns an iterator of the contents of this directory.The optional searchPattern parameter can contain the name of a file (or multiple files, if wildcards are used) within this directory. When it is not
null
only files whose names match the search pattern string are included in the resulting iterator. When it isnull
all files are included.Two wild card characters are supported in the search pattern. The "?" (question mark) character matches a single character. If a search pattern contains one or more "?" characters, then exactly that number of characters is matched by the wildcards. For example, the criterion "??x" matches "abx" but not "abcx" or "ax", because the two file names do not have enough characters preceding the literal. When a file name criterion has "?" characters trailing a literal, then the match is made with specified number of characters or less. For example, the criterion "x??" matches "xab", "xa", and "x", but not "xabc". If only "?" characters are present in the file name selection criterion, then the match is made as if the criterion contained "?" characters trailing a literal. The "*" (asterisk) character matches an entire file name. A null or empty specification criterion also selects all file names. For example, "*.abc" or ".abc" match any file with an extension of "abc". "*.*", "*", or empty string("") match all files in a directory.
-
watchAsync
public Future<SMB2ChangeNotifyResponse> watchAsync(Set<SMB2CompletionFilter> completionFilter, boolean watchTree) Send a change notify request and and return a Future for change notify response.- Parameters:
completionFilter
- types of changes to monitorwatchTree
- monitor changes on any file or directory contained beneath the directory- Returns:
- a Future to be used to retrieve the change notify response packet
-
getFileId
-
toString
-