public class Directory extends DiskEntry implements java.lang.Iterable<FileIdBothDirectoryInformation>
Modifier and Type | Method and Description |
---|---|
SMB2FileId |
getFileId() |
java.util.Iterator<FileIdBothDirectoryInformation> |
iterator()
Equivalent to calling
iterator(FileIdBothDirectoryInformation.class, null) . |
<F extends FileDirectoryQueryableInformation> |
iterator(java.lang.Class<F> informationClass)
Equivalent to calling
iterator(informationClass, null) . |
<F extends FileDirectoryQueryableInformation> |
iterator(java.lang.Class<F> informationClass,
java.lang.String searchPattern)
Returns an iterator of the contents of this directory.
|
java.util.List<FileIdBothDirectoryInformation> |
list()
Equivalent to calling
list(FileIdBothDirectoryInformation.class, null) . |
<F extends FileDirectoryQueryableInformation> |
list(java.lang.Class<F> informationClass)
Equivalent to calling
list(informationClass, null) . |
<F extends FileDirectoryQueryableInformation> |
list(java.lang.Class<F> informationClass,
java.lang.String searchPattern)
Calls
iterator(FileIdBothDirectoryInformation.class, null) and collects
the contents of the returned iterator in a list. |
java.lang.String |
toString() |
close, closeSilently, createHardlink, createHardlink, deleteOnClose, flush, getDiskShare, getFileInformation, getFileInformation, getFileName, getSecurityInformation, ioctl, ioctl, rename, rename, rename, setFileInformation, setSecurityInformation, setSecurityInformation
public java.util.List<FileIdBothDirectoryInformation> list() throws SMBApiException
list(FileIdBothDirectoryInformation.class, null)
.SMBApiException
list(Class, String)
public <F extends FileDirectoryQueryableInformation> java.util.List<F> list(java.lang.Class<F> informationClass) throws SMBApiException
list(informationClass, null)
.SMBApiException
list(Class, String)
public <F extends FileDirectoryQueryableInformation> java.util.List<F> list(java.lang.Class<F> informationClass, java.lang.String searchPattern)
iterator(FileIdBothDirectoryInformation.class, null)
and collects
the contents of the returned iterator in a list.iterator(Class, String)
public java.util.Iterator<FileIdBothDirectoryInformation> iterator()
iterator(FileIdBothDirectoryInformation.class, null)
.iterator
in interface java.lang.Iterable<FileIdBothDirectoryInformation>
iterator(Class, String)
public <F extends FileDirectoryQueryableInformation> java.util.Iterator<F> iterator(java.lang.Class<F> informationClass)
iterator(informationClass, null)
.iterator(Class, String)
public <F extends FileDirectoryQueryableInformation> java.util.Iterator<F> iterator(java.lang.Class<F> informationClass, java.lang.String searchPattern)
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 is null
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.
public SMB2FileId getFileId()
public java.lang.String toString()
toString
in class java.lang.Object