Class Directory

    • Method Detail

      • iterator

        public <F extends FileDirectoryQueryableInformation> java.util.Iterator<F> iterator​(java.lang.Class<F> informationClass,
                                                                                            java.lang.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 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.

      • watchAsync

        public java.util.concurrent.Future<SMB2ChangeNotifyResponse> watchAsync​(java.util.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 monitor
        watchTree - monitor changes on any file or directory contained beneath the directory
        Returns:
        a Future to be used to retrieve the change notify response packet
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object